class Test def main assert CobraCore.commandLineArgs.count in [1, 2] msg = 'main executed despite a test failing' if CobraCore.commandLineArgs.count > 1 # related print msg else p = System.Diagnostics.Process() if CobraCore.isRunningOnMono p.startInfo.fileName = 'mono' p.startInfo.arguments = '--debug 810-test-failure.exe -second-run' else p.startInfo.fileName = '810-test-failure.exe' p.startInfo.arguments = '-second-run' output = p.runAndCaptureAllOutput assert msg not in output def foo test assert CobraCore.commandLineArgs.count == 1 # related body pass