6
6
import subprocess
7
7
import sys
8
8
import os
9
+ from security import safe_command
9
10
10
11
def run_tests ():
11
12
"""Run tests using subprocess to avoid PyO3 issues."""
12
13
print ("Running tests to avoid PyO3 import issues..." )
13
14
14
15
# Run basic functionality test first
15
16
print ("\n 1. Running basic functionality test..." )
16
- result1 = subprocess .run ([sys .executable , "test_basic_functionality.py" ],
17
+ result1 = safe_command .run (subprocess . run , [sys .executable , "test_basic_functionality.py" ],
17
18
capture_output = True , text = True )
18
19
19
20
if result1 .returncode == 0 :
@@ -25,7 +26,7 @@ def run_tests():
25
26
26
27
# Run improved modules tests
27
28
print ("\n 2. Running improved modules tests..." )
28
- result2 = subprocess .run ([sys .executable , "-m" , "pytest" ,
29
+ result2 = safe_command .run (subprocess . run , [sys .executable , "-m" , "pytest" ,
29
30
"tests/test_improved_modules.py" , "-v" ],
30
31
capture_output = True , text = True )
31
32
@@ -38,7 +39,7 @@ def run_tests():
38
39
39
40
# Run multi-issue tests
40
41
print ("\n 3. Running multi-issue tests..." )
41
- result3 = subprocess .run ([sys .executable , "-m" , "pytest" ,
42
+ result3 = safe_command .run (subprocess . run , [sys .executable , "-m" , "pytest" ,
42
43
"tests/test_multi_issue_upload_with_subtasks.py" , "-v" ],
43
44
capture_output = True , text = True )
44
45
@@ -66,4 +67,4 @@ def run_tests():
66
67
return 1
67
68
68
69
if __name__ == "__main__" :
69
- sys .exit (run_tests ())
70
+ sys .exit (run_tests ())
0 commit comments