Skip to content

Commit 7bfee0e

Browse files
committed
make runtime env test pass for runtime created venv
1 parent 26cb66e commit 7bfee0e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/runtime_env_toolchain/toolchain_runs_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ def test_ran(self):
2727
if settings["bootstrap_impl"] == "script":
2828
# Verify we're running in a venv
2929
self.assertNotEqual(sys.prefix, sys.base_prefix)
30-
self.assertIn(".venv/", sys.executable)
30+
# .venv/ occurs for a build-time venv.
31+
# For a runtime created venv, it goes into a temp dir, so
32+
# look for the /bin/ dir as an indicator.
33+
self.assertRegex(sys.executable, r"[.]venv/|/bin/")
3134

3235

3336
if __name__ == "__main__":

0 commit comments

Comments
 (0)