diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-07-14 00:16:58 +0300 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-07-14 00:16:58 +0300 |
commit | c236c62835baaf28458c9abee13c6204da714535 (patch) | |
tree | 34a86f841bbdf08156a1498bbf73a36d65de8b95 | |
parent | 45288d0493a71da79f1e4e8096d2a08ba8014e21 (diff) | |
download | pylint-c236c62835baaf28458c9abee13c6204da714535.tar.gz |
Make a test less stricter by checking that only one message line is expected.
-rw-r--r-- | pylint/test/test_regr.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/pylint/test/test_regr.py b/pylint/test/test_regr.py index 3b89899..34b43f6 100644 --- a/pylint/test/test_regr.py +++ b/pylint/test/test_regr.py @@ -139,15 +139,10 @@ class NonRegrTC(unittest.TestCase): self.assertEqual(got, "") def test_no_context_file(self): - if platform.system() == 'Java': - message = "E: 2: mismatched input '.' expecting set null\n" - else: - message = "E: 2: invalid syntax\n" - message = message + ("E: 5: No name 'missing' in module ''\n" - "W: 5: Unused import missing") + expected = "E: 5: No name 'missing' in module ''\n" linter.check(join(REGR_DATA, 'bad_package')) got = linter.reporter.finalize().strip() - self.assertEqual(got, message) + self.assertIn(expected, got) if __name__ == '__main__': |