def test_multifile_import_external(): compileCode("multiFileImportExternal", "import external\ndef f(): return external.f()") write_to_file(path_combine(testpath.temporary_dir, "external.py"), "def f(): return 'hello'") import multiFileImportExternal AreEqual(multiFileImportExternal.f(), 'hello')
def test_multifile_import_external(self): self.compileCode("multiFileImportExternal", "import external\ndef f(): return external.f()") self.write_to_file(os.path.join(self.temporary_dir, "external.py"), "def f(): return 'hello'") import multiFileImportExternal self.assertEqual(multiFileImportExternal.f(), 'hello')