Skip to content

Commit

Permalink
Fix tests breaking on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
cjao committed Jan 20, 2025
1 parent 53da917 commit 2b09192
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- `get_result(wait=True)` no longer times out
- Fixed tests on mac

### Changed

Expand Down
10 changes: 7 additions & 3 deletions tests/covalent_dispatcher_tests/_cli/service_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,15 @@ def test_python_path_in_venv():
venv.create(tmp_dir, with_pip=False)
custom_env = os.environ.copy()
# equivalent of source venv/bin/activate
custom_env["VIRTUAL_ENV"] = tmp_dir
custom_env["VIRTUAL_ENV"] = os.path.realpath(tmp_dir)
custom_env["PATH"] = f"{tmp_dir}/bin:$PATH"
check_path_cmd = ["python", "-c", "import sys; print(sys.executable)"]
check_path_cmd = [
"python",
"-c",
"import os; import sys; print(os.path.realpath(sys.executable))",
]
res = subprocess.run(check_path_cmd, check=True, capture_output=True, env=custom_env)
assert res.stdout.decode().startswith(tmp_dir)
assert res.stdout.decode().startswith(os.path.realpath(tmp_dir))


def test_read_pid_nonexistent_file():
Expand Down

0 comments on commit 2b09192

Please sign in to comment.