def test_importer_module(self): """Testing importer.load: module""" mod = load("sys") assert mod == sys
def test_importer_path(self): """Testing importer.load: from path""" path = os.path.dirname(__file__) cl = load("test_importer", "TestImporter", path=[path]) assert cl.__name__ == 'TestImporter'
def test_importer_default(self): """Testing importer.load: from standard library""" cl = load("unittest.main", "TestProgram") assert cl.__name__ == 'TestProgram'