Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
test_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AshishMahendra committed Jul 29, 2024
1 parent 311d6e3 commit 99cb798
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions jaclang/tests/test_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,20 +229,13 @@ def test_deep_imports_mods(self) -> None:
"deep.deeper.snd_lev",
"deep.one_lev",
]
for i in targets:
if i in sys.modules:
del sys.modules[i]
Jac.get_root()._jac_.edges.clear()
Jac.context().init_memory(base_path=self.fixture_abs_path("./"))
captured_output = io.StringIO()
sys.stdout = captured_output
jac_import("deep_import_mods", base_path=self.fixture_abs_path("./"))
sys.stdout = sys.__stdout__
stdout_value = captured_output.getvalue()
mods = eval(stdout_value)
mods = Jac.context().jac_machine.loaded_modules.keys()
for i in targets:
self.assertIn(i, mods)
self.assertEqual(len([i for i in mods if i.startswith("deep")]), 5)
self.assertEqual(len([i for i in mods if i.startswith("deep")]), 6)

def test_deep_outer_imports_one(self) -> None:
"""Parse micro jac file."""
Expand Down

0 comments on commit 99cb798

Please sign in to comment.