From 20011e75541df818abea3e603dda15bc6f72994e Mon Sep 17 00:00:00 2001 From: Joel Baranick Date: Mon, 21 Dec 2020 09:09:46 -0800 Subject: [PATCH] Add no-warnings cli test --- tests/test_cli.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_cli.py b/tests/test_cli.py index 0cb300a..169990e 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -614,6 +614,16 @@ class CommandLineTestCase(unittest.TestCase): cli.run((path, '--no-warnings', '-f', 'auto')) self.assertEqual(ctx.returncode, 0) + def test_run_no_warnings_from_config(self): + with open(os.path.join(self.wd, 'config'), 'w') as f: + f.write('no-warnings: true') + + path = os.path.join(self.wd, 'warn.yaml') + + with RunContext(self) as ctx: + cli.run((path, '-c', f.name, '-f', 'auto')) + self.assertEqual(ctx.returncode, 0) + def test_run_no_warnings_and_strict(self): path = os.path.join(self.wd, 'warn.yaml')