def testPathHook(self): sys.path_hooks.append(PathImporter) sys.path.append(test_path) self.doTestImports()