@@ -83,13 +83,13 @@ def test_fulltext_program(self):
83
83
84
84
try :
85
85
with captured_output () as (out , err ):
86
- Compare .program ("python correct.py" ,
87
- "python incorrect.py" ,
86
+ Compare .program (f" { sys . executable } correct.py" ,
87
+ f" { sys . executable } incorrect.py" ,
88
88
std = io ,
89
89
input = io ,
90
90
grader = "FullText" )
91
91
except CompareMismatch as e :
92
- self .assertEqual (e .name , 'python incorrect.py' )
92
+ self .assertEqual (e .name , f' { sys . executable } incorrect.py' )
93
93
e = e .mismatch
94
94
self .assertEqual (e .content , '2\n ' )
95
95
self .assertEqual (e .std , '1\n ' )
@@ -105,7 +105,7 @@ def test_fulltext_program(self):
105
105
self .assertTrue (False )
106
106
107
107
result = out .getvalue ().strip ()
108
- correct_out = 'python correct.py: Correct \n python incorrect.py: !!!INCORRECT!!! Hash mismatch: read 53c234e5e8472b6ac51c1ae1cab3fe06fad053beb8ebfd8977b010655bfdd3c3, expected 4355a46b19d348dc2f57c046f8ef63d4538ebb936000f3c9ee954a27460dd865'
108
+ correct_out = f' { sys . executable } correct.py: Correct \n { sys . executable } incorrect.py: !!!INCORRECT!!! Hash mismatch: read 53c234e5e8472b6ac51c1ae1cab3fe06fad053beb8ebfd8977b010655bfdd3c3, expected 4355a46b19d348dc2f57c046f8ef63d4538ebb936000f3c9ee954a27460dd865'
109
109
self .assertEqual (result , correct_out )
110
110
111
111
def test_file_input (self ):
@@ -122,13 +122,13 @@ def test_file_input(self):
122
122
io .input_writeln ("233" )
123
123
124
124
with captured_output () as (out , err ):
125
- Compare .program ("python correct.py" ,
126
- std_program = "python std.py" ,
125
+ Compare .program (f" { sys . executable } correct.py" ,
126
+ std_program = f" { sys . executable } std.py" ,
127
127
input = io ,
128
128
grader = "NOIPStyle" )
129
129
130
130
result = out .getvalue ().strip ()
131
- correct_out = 'python correct.py: Correct'
131
+ correct_out = f' { sys . executable } correct.py: Correct'
132
132
self .assertEqual (result , correct_out )
133
133
134
134
def test_concurrent (self ):
0 commit comments