Add cleanup for IGNORE in test_bash8

Since we aren't resetting this module level variable,
it will interfere with other tests, which is not desirable.

Change-Id: Ifd60990b5dc922bb5f604f092d6b9da10f0e7aee
This commit is contained in:
Mathew Odden
2014-05-27 17:12:04 -05:00
parent bba3b34900
commit 7266653449

View File

@@ -25,6 +25,14 @@ from bash8.tests import base
class TestBash8(base.TestCase): class TestBash8(base.TestCase):
def setUp(self):
super(TestBash8, self).setUp()
# cleanup global IGNOREs
def reset_ignores():
bash8.IGNORE = None
self.addCleanup(reset_ignores)
def test_multi_ignore(self): def test_multi_ignore(self):
bash8.register_ignores('E001|E011') bash8.register_ignores('E001|E011')
bash8.check_no_trailing_whitespace("if ") bash8.check_no_trailing_whitespace("if ")