diff options
| author | Torsten Marek <tmarek@google.com> | 2013-06-20 13:46:55 +0200 |
|---|---|---|
| committer | Torsten Marek <tmarek@google.com> | 2013-06-20 13:46:55 +0200 |
| commit | f19e4a9bbc1186106b2b5ee671be33ee610ac935 (patch) | |
| tree | 75ada3c95f6c4b0f11a73c5275597743508babad /testutils.py | |
| parent | 9538af878b8cc0b5e377ee757a085d3f7dae4758 (diff) | |
| download | pylint-git-f19e4a9bbc1186106b2b5ee671be33ee610ac935.tar.gz | |
Extend the CheckerTestCase to allow overriding configuration values during setUp.
Diffstat (limited to 'testutils.py')
| -rw-r--r-- | testutils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/testutils.py b/testutils.py index 81d379943..c3f719f22 100644 --- a/testutils.py +++ b/testutils.py @@ -146,10 +146,13 @@ class UnittestLinter(object): class CheckerTestCase(testlib.TestCase): """A base testcase class for unittesting individual checker classes.""" CHECKER_CLASS = None - + CONFIG = {} + def setUp(self): self.linter = UnittestLinter() self.checker = self.CHECKER_CLASS(self.linter) + for key, value in self.CONFIG.iteritems(): + setattr(self.checker.config, key, value) self.checker.open() self.checker.stats = self.linter.stats |
