diff --git a/jaclang/compiler/tests/test_importer.py b/jaclang/compiler/tests/test_importer.py index a3f51fb50..a80335ebe 100644 --- a/jaclang/compiler/tests/test_importer.py +++ b/jaclang/compiler/tests/test_importer.py @@ -55,11 +55,3 @@ def test_jac_py_import_auto(self) -> None: stdout_value, ) - def test_package_import(self) -> None: - """Test package import.""" - captured_output = io.StringIO() - sys.stdout = captured_output - cli.run(self.fixture_abs_path("../../../tests/fixtures/package_import.jac")) - sys.stdout = sys.__stdout__ - stdout_value = captured_output.getvalue() - self.assertEqual("package is imported successfully!\n", stdout_value) diff --git a/jaclang/tests/fixtures/package_import.jac b/jaclang/tests/fixtures/package_import.jac deleted file mode 100644 index 41c2f8594..000000000 --- a/jaclang/tests/fixtures/package_import.jac +++ /dev/null @@ -1,6 +0,0 @@ -import:py tkinter as tk ; -import:py from tkinter, messagebox ; - -with entry { - print("package is imported successfully!") ; -} \ No newline at end of file diff --git a/jaclang/tests/test_language.py b/jaclang/tests/test_language.py index f83a0aa5d..f5043b3da 100644 --- a/jaclang/tests/test_language.py +++ b/jaclang/tests/test_language.py @@ -703,7 +703,7 @@ def test_lambda_expr(self) -> None: stdout_value = captured_output.getvalue().split("\n") self.assertEqual("9", stdout_value[0]) self.assertEqual("567", stdout_value[1]) - + def test_random_check(self) -> None: """Test py ast to Jac ast conversion output.""" settings.py_raise = True @@ -712,12 +712,12 @@ def test_random_check(self) -> None: import jaclang.compiler.absyntree as ast import ast as py_ast - module_paths = ["random", "tkinter"] + module_paths = ["random", "ast"] for module_path in module_paths: stdlib_dir = sysconfig.get_paths()["stdlib"] file_path = os.path.join( stdlib_dir, - module_path + (".py" if module_path == "random" else "/__init__.py"), + module_path + ".py", ) with open(file_path) as f: jac_ast = PyastBuildPass( @@ -730,7 +730,7 @@ def test_random_check(self) -> None: if module_path == "random": self.assertIn("ModulePath - statistics -", gen_ast) else: - self.assertIn("+-- Name - TclError - Type: No", gen_ast) + self.assertIn("+-- Name - NodeTransformer - Type: No", gen_ast) settings.py_raise = False def test_deep_py_load_imports(self) -> None: # we can get rid of this, isn't?