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:
@@ -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 ")
|
||||||
|
|||||||
Reference in New Issue
Block a user