def test_CppCompiler_success(): fs = FakeSystemOperations() c = CppCompiler( fs ) c.run( "myprog", "testexe" ) assert_equal( fs.calls, [ "Popen(g++,-x,c++,-o,testexe,-)", "communicate(myprog)", ] )
def test_CppCompiler_failure(): fs = FakeSystemOperations( 1 ) c = CppCompiler( fs ) c.run( "myprog", "testexe" )