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):
8484
8585 try :
8686 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" ,
8989 std = io ,
9090 input = io ,
9191 grader = "FullText" )
9292 except CompareMismatch as e :
93- self .assertEqual (e .name , 'python incorrect.py' )
93+ self .assertEqual (e .name , f' { sys . executable } incorrect.py' )
9494 e = e .mismatch
9595 self .assertEqual (e .content , '2\n ' )
9696 self .assertEqual (e .std , '1\n ' )
@@ -106,7 +106,7 @@ def test_fulltext_program(self):
106106 self .assertTrue (False )
107107
108108 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'
110110 self .assertEqual (result , correct_out )
111111
112112 def test_file_input_success (self ):
You can’t perform that action at this time.
0 commit comments