import unittest


class TestExtensions(unittest.TestCase):
    def test_import_extension(self):
        import pybel.ext.test

        assert pybel.ext.test.an_extension_function() == 42

    def test_import_extension_2(self):
        from pybel.ext.test import an_extension_function

        assert an_extension_function() == 42

    def test_import_extension_3(self):
        from pybel.ext import test

        assert test.an_extension_function() == 42

@@ -429,28 +429,164 @@
 _extension_function() == 42%0A
+%0A    def test_import_extension_4(self):%0A        with self.assertRaises(ImportError):%0A            from pybel.ext import not_an_extension%0A

Add a test for importing a nonexistent extension