File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -84,13 +84,13 @@ def test_fulltext_program(self):
84
84
85
85
try :
86
86
with captured_output () as (out , err ):
87
- Compare .program ("python correct.py" ,
88
- "python incorrect.py" ,
87
+ Compare .program (f" { sys . executable } correct.py" ,
88
+ f" { sys . executable } incorrect.py" ,
89
89
std = io ,
90
90
input = io ,
91
91
grader = "FullText" )
92
92
except CompareMismatch as e :
93
- self .assertEqual (e .name , 'python incorrect.py' )
93
+ self .assertEqual (e .name , f' { sys . executable } incorrect.py' )
94
94
e = e .mismatch
95
95
self .assertEqual (e .content , '2\n ' )
96
96
self .assertEqual (e .std , '1\n ' )
@@ -106,7 +106,7 @@ def test_fulltext_program(self):
106
106
self .assertTrue (False )
107
107
108
108
result = out .getvalue ().strip ()
109
- correct_out = 'python correct.py: Correct \n python incorrect.py: !!!INCORRECT!!! Hash mismatch: read 53c234e5e8472b6ac51c1ae1cab3fe06fad053beb8ebfd8977b010655bfdd3c3, expected 4355a46b19d348dc2f57c046f8ef63d4538ebb936000f3c9ee954a27460dd865'
109
+ correct_out = f' { sys . executable } correct.py: Correct \n { sys . executable } incorrect.py: !!!INCORRECT!!! Hash mismatch: read 53c234e5e8472b6ac51c1ae1cab3fe06fad053beb8ebfd8977b010655bfdd3c3, expected 4355a46b19d348dc2f57c046f8ef63d4538ebb936000f3c9ee954a27460dd865'
110
110
self .assertEqual (result , correct_out )
111
111
112
112
def test_file_input_success (self ):
You can’t perform that action at this time.
0 commit comments