Add no-warnings cli test

pull/348/head
Joel Baranick 4 years ago
parent de09a23b2c
commit 20011e7554

@ -614,6 +614,16 @@ class CommandLineTestCase(unittest.TestCase):
cli.run((path, '--no-warnings', '-f', 'auto')) cli.run((path, '--no-warnings', '-f', 'auto'))
self.assertEqual(ctx.returncode, 0) 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): def test_run_no_warnings_and_strict(self):
path = os.path.join(self.wd, 'warn.yaml') path = os.path.join(self.wd, 'warn.yaml')

Loading…
Cancel
Save