1010
1111import ast
1212import json
13+ import sys
1314import threading
1415import time
1516import urllib .request
@@ -2108,7 +2109,7 @@ def test_load_session_argument_accepted(self):
21082109 """CLI parser must accept --load-session argument."""
21092110 import subprocess
21102111 result = subprocess .run (
2111- ["venv/bin/python3" , "-m" , "humeris.cli" , "--help" ],
2112+ [sys . executable , "-m" , "humeris.cli" , "--help" ],
21122113 capture_output = True , text = True , timeout = 10 ,
21132114 )
21142115 assert "--load-session" in result .stdout
@@ -2118,7 +2119,7 @@ def test_load_session_file_not_found(self, tmp_path):
21182119 import subprocess
21192120 result = subprocess .run (
21202121 [
2121- "venv/bin/python3" , "-m" , "humeris.cli" ,
2122+ sys . executable , "-m" , "humeris.cli" ,
21222123 "--serve" , "--load-session" , "/nonexistent/session.json" ,
21232124 ],
21242125 capture_output = True , text = True , timeout = 10 ,
@@ -2133,7 +2134,7 @@ def test_load_session_invalid_json(self, tmp_path):
21332134 bad_file .write_text ("not json at all" )
21342135 result = subprocess .run (
21352136 [
2136- "venv/bin/python3" , "-m" , "humeris.cli" ,
2137+ sys . executable , "-m" , "humeris.cli" ,
21372138 "--serve" , "--load-session" , str (bad_file ),
21382139 ],
21392140 capture_output = True , text = True , timeout = 10 ,
@@ -2348,7 +2349,7 @@ def test_headless_argument_accepted(self):
23482349 """CLI parser must accept --headless argument."""
23492350 import subprocess
23502351 result = subprocess .run (
2351- ["venv/bin/python3" , "-m" , "humeris.cli" , "--help" ],
2352+ [sys . executable , "-m" , "humeris.cli" , "--help" ],
23522353 capture_output = True , text = True , timeout = 10 ,
23532354 )
23542355 assert "--headless" in result .stdout
@@ -2358,7 +2359,7 @@ def test_headless_requires_load_session(self):
23582359 import subprocess
23592360 result = subprocess .run (
23602361 [
2361- "venv/bin/python3" , "-m" , "humeris.cli" ,
2362+ sys . executable , "-m" , "humeris.cli" ,
23622363 "--serve" , "--headless" ,
23632364 ],
23642365 capture_output = True , text = True , timeout = 10 ,
@@ -2391,7 +2392,7 @@ def test_headless_export_czml(self, tmp_path):
23912392
23922393 result = subprocess .run (
23932394 [
2394- "venv/bin/python3" , "-m" , "humeris.cli" ,
2395+ sys . executable , "-m" , "humeris.cli" ,
23952396 "--serve" , "--headless" ,
23962397 "--load-session" , str (session_file ),
23972398 "--export-czml" , str (output_dir ),
0 commit comments