diff options
author | Siddhartha Mishra <sidm1999@gmail.com> | 2019-09-21 18:12:41 +0530 |
---|---|---|
committer | Siddhartha Mishra <sidm1999@gmail.com> | 2019-09-22 14:16:46 +0530 |
commit | aa7ba1a850543a147074ec0c693d7bfcdfda9797 (patch) | |
tree | 4befbac409916500fcf8bb2b6d00666252d03810 /python/tidy/servo_tidy_tests/test_tidy.py | |
parent | 3ced8d4ddcc7328e27231f9db9ce2f441b01d37e (diff) | |
download | servo-aa7ba1a850543a147074ec0c693d7bfcdfda9797.tar.gz servo-aa7ba1a850543a147074ec0c693d7bfcdfda9797.zip |
report when blocked package exception is not needed
Diffstat (limited to 'python/tidy/servo_tidy_tests/test_tidy.py')
-rw-r--r-- | python/tidy/servo_tidy_tests/test_tidy.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py index 280190931c2..b7ec67cf9c9 100644 --- a/python/tidy/servo_tidy_tests/test_tidy.py +++ b/python/tidy/servo_tidy_tests/test_tidy.py @@ -229,6 +229,25 @@ class CheckTidiness(unittest.TestCase): self.assertNoMoreErrors(errors) + def test_lock_exceptions(self): + tidy.config["blocked-packages"]["rand"] = ["test_exception", "test_unneeded_exception"] + errors = tidy.collect_errors_for_files(iterFile('blocked_package.lock'), [tidy.check_lock], [], print_text=False) + + msg = ( + "Package test_blocked 0.0.2 depends on blocked package rand." + ) + + msg2 = ( + "Package test_unneeded_exception is not required to be an exception of blocked package rand." + ) + + self.assertEqual(msg, errors.next()[2]) + self.assertEqual(msg2, errors.next()[2]) + self.assertNoMoreErrors(errors) + + # needed to not raise errors in other test cases + tidy.config["blocked-packages"]["rand"] = [] + def test_lint_runner(self): test_path = base_path + 'lints/' runner = tidy.LintRunner(only_changed_files=False, progress=False) |