Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
fix test for sys_path in run_in_venv
Browse files Browse the repository at this point in the history
  • Loading branch information
Roulbac committed Aug 2, 2023
1 parent e9baee0 commit 646a7b9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/flojoy_node_venv_test_.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def empty_function_with_jax():
# Test for executable
assert sys_executable.startswith(mock_venv_cache_dir)
# Test for sys.path
assert sys_path[-1].startswith(mock_venv_cache_dir)
assert sys_path[-1].startswith(os.path.dirname(__file__))
assert sys_path[-2].startswith(mock_venv_cache_dir)
# Test for package version
assert packages_dict["jax"] == "0.4.13"

Expand All @@ -76,7 +77,8 @@ def empty_function_with_flytekit():
# Test for executable
assert sys_executable.startswith(mock_venv_cache_dir)
# Test for sys.path
assert sys_path[-1].startswith(mock_venv_cache_dir)
assert sys_path[-1].startswith(os.path.dirname(__file__))
assert sys_path[-2].startswith(mock_venv_cache_dir)
# Test for package version
assert packages_dict["flytekit"] == "1.8.2"

Expand Down Expand Up @@ -104,7 +106,8 @@ def empty_function_with_opencv():
# Test for executable
assert sys_executable.startswith(mock_venv_cache_dir)
# Test for sys.path
assert sys_path[-1].startswith(mock_venv_cache_dir)
assert sys_path[-1].startswith(os.path.dirname(__file__))
assert sys_path[-2].startswith(mock_venv_cache_dir)
# Test for package version
assert packages_dict["opencv-python-headless"] == "4.7.0.72"

Expand Down

0 comments on commit 646a7b9

Please sign in to comment.