def test_analysis_should_raise_systemexit_1_in_console_script(self): self.given_a_file_in_test_dir('invalid.py', INVALID_CODE) with OutputCapture(): with self.assertRaisesRegexp(SystemExit, '1'): console_script(self.options)
def test_analysis_should_raise_systemexit_0_in_console_script(self): with OutputCapture(): with self.assertRaisesRegexp(SystemExit, '0'): console_script(self.options)