11import contextlib
22import os
33import subprocess
4+ import sys
45import time
56from pathlib import Path
67
1819@contextlib .contextmanager
1920def julabo_simulation ():
2021 command = [
21- "uv" ,
22- "run" ,
22+ sys .executable ,
2323 str (LEWIS_PATH ),
2424 "julabo" ,
2525 "-p" ,
@@ -34,7 +34,9 @@ def julabo_simulation():
3434
3535
3636def run_control_command (mode , command , value ):
37- subprocess .check_output (["uv" , "run" , str (LEWIS_CONTROL_PATH ), mode , command , value ]).decode ()
37+ subprocess .check_output (
38+ [sys .executable , str (LEWIS_CONTROL_PATH ), mode , command , value ]
39+ ).decode ()
3840
3941
4042def santise_whitespace (input_str ):
@@ -43,7 +45,7 @@ def santise_whitespace(input_str):
4345
4446def query_device_status ():
4547 return santise_whitespace (
46- subprocess .check_output (["uv" , "run" , str (LEWIS_CONTROL_PATH ), "device" ]).decode ()
48+ subprocess .check_output ([sys . executable , str (LEWIS_CONTROL_PATH ), "device" ]).decode ()
4749 )
4850
4951
@@ -58,7 +60,7 @@ def test_list_available_devices(self):
5860 Then: returns a list of possible simulations
5961 """
6062 result = santise_whitespace (
61- subprocess .check_output (["uv" , "run" , str (LEWIS_PATH )]).decode ()
63+ subprocess .check_output ([sys . executable , str (LEWIS_PATH )]).decode ()
6264 )
6365
6466 verify (result , self .reporter )
0 commit comments