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

test: redo for macos friendliness #538

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions jaclang/compiler/tests/test_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 0 additions & 6 deletions jaclang/tests/fixtures/package_import.jac

This file was deleted.

8 changes: 4 additions & 4 deletions jaclang/tests/test_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand All @@ -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?
Expand Down
Loading