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

Commit

Permalink
Merge pull request #539 from Jaseci-Labs/mac2_try
Browse files Browse the repository at this point in the history
test: mac friendly
  • Loading branch information
marsninja authored Jul 29, 2024
2 parents ed54084 + 704ceb7 commit e8e7237
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
9 changes: 0 additions & 9 deletions jaclang/compiler/tests/test_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,3 @@ def test_jac_py_import_auto(self) -> None:
"{SomeObj(a=10): 'check'} [MyObj(apple=5, banana=7), MyObj(apple=5, banana=7)]",
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.

6 changes: 3 additions & 3 deletions jaclang/tests/test_language.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e8e7237

Please sign in to comment.