import os import re import shutil from tests.global_fns import * def test_compile_c(): fh = os.popen("gcc -o HelloWorld ./HelloWorld.c", mode='r', buffering=-1) output = fh.read() retcode = fh.close() assert retcode == None def test_c(): fh = os.popen("./HelloWorld", mode='r', buffering=-1) output = fh.read() retcode = fh.close() assert retcode == None and checkOutput(output) def test_c_cleanup(): fh = os.popen("rm ./HelloWorld", mode='r', buffering=-1) output = fh.read() retcode = fh.close() assert retcode == None