diff options
-rw-r--r-- | test/test_func.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/test_func.py b/test/test_func.py index 078ff93d5..9765088c3 100644 --- a/test/test_func.py +++ b/test/test_func.py @@ -98,15 +98,16 @@ class LintTestUsingModule(testlib.TestCase): print ex ex.__str__ = exception_str raise - got = self.linter.reporter.finalize().strip() + got = self.linter.reporter.finalize() self.assertMultiLineEqual(got, self._get_expected()) + def _get_expected(self): if self.module.startswith('func_noerror_'): expected = '' else: output = open(self.output) - expected = output.read().strip() + expected = output.read().strip() + '\n' output.close() return expected @@ -157,12 +158,12 @@ class TestTests(testlib.TestCase): class LintTestNonExistentModuleTC(LintTestUsingModule): module = 'nonexistent' - _get_expected = lambda self: 'F: 1: No module named nonexistent' + _get_expected = lambda self: 'F: 1: No module named nonexistent\n' tags = testlib.Tags(('generated','pylint_input_%s' % module)) class LintTestNonExistentFileTC(LintTestUsingFile): module = join(INPUT_DIR, 'nonexistent.py') - _get_expected = lambda self: 'F: 1: No module named %s' % self.module[len(getcwd())+1 :] + _get_expected = lambda self: 'F: 1: No module named %s\n' % self.module[len(getcwd())+1 :] tags = testlib.Tags(('generated', 'pylint_input_%s' % module)) def test_functionality(self): self._test([self.module]) |