diff options
| author | Torsten Marek <shlomme@gmail.com> | 2014-07-25 16:04:38 +0200 |
|---|---|---|
| committer | Torsten Marek <shlomme@gmail.com> | 2014-07-25 16:04:38 +0200 |
| commit | 2ca8d9fe0de9adeba8cc8ac77fd75c4c5e912362 (patch) | |
| tree | ea1ab75c8f2655f2af1fd800191bcc6bb0f286ce /test | |
| parent | a288c6eceb47bca013b9c9ebf0c37e3260303654 (diff) | |
| download | pylint-2ca8d9fe0de9adeba8cc8ac77fd75c4c5e912362.tar.gz | |
Support multi-line messages in the expected output files.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_functional.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/test_functional.py b/test/test_functional.py index bd65ce3..449c933 100644 --- a/test/test_functional.py +++ b/test/test_functional.py @@ -193,11 +193,18 @@ class LintModuleTest(testlib.TestCase): lines = [] if self._produces_output() and expected: with open(self._test_file.expected_output, 'U') as fobj: + used = True for line in fobj: - parts = line.split(':') - linenum = int(parts[1]) - if (linenum, parts[0]) in expected: + parts = line.split(':', 2) + if len(parts) != 3 and used: lines.append(line) + else: + linenum = int(parts[1]) + if (linenum, parts[0]) in expected: + used = True + lines.append(line) + else: + used = False return expected, ''.join(lines) def _get_received(self): |
