From 72666534496a5a8f5bb7c26d6cd0316f944e1e9f Mon Sep 17 00:00:00 2001 From: Mathew Odden Date: Tue, 27 May 2014 17:12:04 -0500 Subject: [PATCH] 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 --- bash8/tests/test_bash8.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bash8/tests/test_bash8.py b/bash8/tests/test_bash8.py index d6a7c1a..641b8fe 100644 --- a/bash8/tests/test_bash8.py +++ b/bash8/tests/test_bash8.py @@ -25,6 +25,14 @@ from bash8.tests import base 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): bash8.register_ignores('E001|E011') bash8.check_no_trailing_whitespace("if ")