@@ -17,7 +17,7 @@ def communicate(self):
17
17
18
18
class TestPythonRuntimeValidator (TestCase ):
19
19
def setUp (self ):
20
- self .validator = PythonRuntimeValidator (runtime = "python3.7 " , architecture = "x86_64" )
20
+ self .validator = PythonRuntimeValidator (runtime = "python3.12 " , architecture = "x86_64" )
21
21
22
22
def test_runtime_validate_unsupported_language_fail_open (self ):
23
23
validator = PythonRuntimeValidator (runtime = "python2.6" , architecture = "arm64" )
@@ -27,7 +27,7 @@ def test_runtime_validate_unsupported_language_fail_open(self):
27
27
def test_runtime_validate_supported_version_runtime (self ):
28
28
with mock .patch ("subprocess.Popen" ) as mock_subprocess :
29
29
mock_subprocess .return_value = MockSubProcess (0 )
30
- self .validator .validate (runtime_path = "/usr/bin/python3.7 " )
30
+ self .validator .validate (runtime_path = "/usr/bin/python3.12 " )
31
31
self .assertTrue (mock_subprocess .call_count , 1 )
32
32
33
33
def test_runtime_validate_mismatch_version_runtime (self ):
@@ -38,14 +38,14 @@ def test_runtime_validate_mismatch_version_runtime(self):
38
38
self .assertTrue (mock_subprocess .call_count , 1 )
39
39
40
40
def test_python_command (self ):
41
- cmd = self .validator ._validate_python_cmd (runtime_path = "/usr/bin/python3.7 " )
42
- version_strings = ["sys.version_info.major == 3" , "sys.version_info.minor == 7 " ]
41
+ cmd = self .validator ._validate_python_cmd (runtime_path = "/usr/bin/python3.12 " )
42
+ version_strings = ["sys.version_info.major == 3" , "sys.version_info.minor == 12 " ]
43
43
for version_string in version_strings :
44
44
self .assertTrue (all ([part for part in cmd if version_string in part ]))
45
45
46
46
@parameterized .expand (
47
47
[
48
- ("python3.7 " , "arm64 " ),
48
+ ("python3.12 " , "invalid_arch " ),
49
49
]
50
50
)
51
51
def test_runtime_validate_with_incompatible_architecture (self , runtime , architecture ):
0 commit comments