diff options
Diffstat (limited to 'pylint/test/unittest_lint.py')
| -rw-r--r-- | pylint/test/unittest_lint.py | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/pylint/test/unittest_lint.py b/pylint/test/unittest_lint.py index b8a153f86..6e8c54962 100644 --- a/pylint/test/unittest_lint.py +++ b/pylint/test/unittest_lint.py @@ -741,21 +741,24 @@ def test_custom_should_analyze_file(): package_dir = os.path.join(HERE, 'regrtest_data', 'bad_package') wrong_file = os.path.join(package_dir, 'wrong.py') - reporter = testutils.TestReporter() - linter = CustomPyLinter() - linter.config.persistent = 0 - linter.open() - linter.set_reporter(reporter) - try: - sys.path.append(os.path.dirname(package_dir)) - linter.check([package_dir, wrong_file]) - finally: - sys.path.pop() + for jobs in [1, 2]: + reporter = testutils.TestReporter() + linter = CustomPyLinter() + linter.config.jobs = jobs + linter.config.persistent = 0 + linter.open() + linter.set_reporter(reporter) - messages = reporter.messages - assert len(messages) == 1 - assert 'invalid syntax' in messages[0] + try: + sys.path.append(os.path.dirname(package_dir)) + linter.check([package_dir, wrong_file]) + finally: + sys.path.pop() + + messages = reporter.messages + assert len(messages) == 1 + assert 'invalid syntax' in messages[0] def test_filename_with__init__(init_linter): |
