def test_bears_ci_mode(self): sys.argv.append('--ci') orig_cwd = os.getcwd() os.chdir(os.path.dirname(os.path.realpath(__file__))) os.chdir("bears_ci_testfiles") with retrieve_stdout() as custom_stdout: main() self.assertIn("usable", custom_stdout.getvalue()) os.remove('.coafile') os.chdir(orig_cwd)
def test_bears_ci_mode(self): sys.argv.append('--ci') orig_cwd = os.getcwd() os.chdir(os.path.dirname(os.path.realpath(__file__))) os.chdir("bears_ci_testfiles") with retrieve_stdout() as custom_stdout: main() self.assertIn("usable", custom_stdout.getvalue()) os.remove('.coafile') os.chdir(orig_cwd)
def test_print_coala_quickstart_version_long(self): sys.argv.append('--version') with retrieve_stdout() as custom_stdout: with self.assertRaises(SystemExit) as cm: main() self.assertEquals('0.4.0\n', custom_stdout.getvalue())
def test_print_coala_quickstart_version_long(self): sys.argv.append('--version') with retrieve_stdout() as custom_stdout: with self.assertRaises(SystemExit) as cm: main() self.assertEquals('0.4.0\n', custom_stdout.getvalue())