diff --git a/sio/compilers/test/test_compilers.py b/sio/compilers/test/test_compilers.py index 4794365..d3027c0 100644 --- a/sio/compilers/test/test_compilers.py +++ b/sio/compilers/test/test_compilers.py @@ -175,9 +175,8 @@ def test_output_compilation_and_running(source): ) eq_(post_run_env['result_code'], 'OK') - ft.download(post_run_env, 'out_file', tempcwd('out.txt')) ft.download({'source_file': source}, 'source_file', tempcwd('source.txt')) - with open(tempcwd('out.txt'), 'r') as outfile: + with open(tempcwd('out'), 'r') as outfile: with open(tempcwd('source.txt'), 'r') as sourcefile: eq_(outfile.read(), sourcefile.read()) @@ -195,10 +194,10 @@ def test_output_archive_compilation_and_running(source): eq_(result_env['result_code'], 'OK') eq_(result_env['exec_info'], {'mode': 'output-only'}) - ft.download(result_env, 'out_file', tempcwd('out.txt')) - ft.download({'source_file': source}, 'source_file', tempcwd('source.txt')) - with open(tempcwd('out.txt'), 'r') as outfile: - with open(tempcwd('source.txt'), 'r') as sourcefile: + ft.download(result_env, 'out_file', tempcwd('out.zip')) + ft.download({'source_file': source}, 'source_file', tempcwd('source.zip')) + with open(tempcwd('out.zip'), 'rb') as outfile: + with open(tempcwd('source.zip'), 'rb') as sourcefile: eq_(outfile.read(), sourcefile.read()) post_run_env = run_from_executors( @@ -214,10 +213,10 @@ def test_output_archive_compilation_and_running(source): ) eq_(post_run_env['result_code'], 'OK') - ft.download(post_run_env, 'out_file', tempcwd('out.txt')) - ft.download({'source_file': source}, 'source_file', tempcwd('source.txt')) - with open(tempcwd('out.txt'), 'r') as outfile: - with open(tempcwd('source.txt'), 'r') as sourcefile: + # abc0.out in simple.zip is the same as simple.txt + ft.download({'source_file': '/simple.txt'}, 'source_file', tempcwd('simple.txt')) + with open(tempcwd('out'), 'r') as outfile: + with open(tempcwd('simple.txt'), 'r') as sourcefile: eq_(outfile.read(), sourcefile.read())