From bf258d2d9a30385f62e4c77158fa0427134e7603 Mon Sep 17 00:00:00 2001
From: Claudiu Popa <pcmanticore@gmail.com>
Date: Tue, 22 May 2018 09:47:12 +0200
Subject: [PATCH] Use the absolute paths for tests and adapt the codes to the
right ones. Close #2129
---
pylint/test/test_self.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/pylint/test/test_self.py b/pylint/test/test_self.py
index 3ac6b73db..1cc9eeff2 100644
--- a/pylint/test/test_self.py
+++ b/pylint/test/test_self.py
@@ -94,7 +94,7 @@ def linter(self, value):
class TestRunTC(object):
- def _runtest(self, args, reporter=None, out=None, code=28):
+ def _runtest(self, args, reporter=None, out=None, code=None):
if out is None:
out = six.StringIO()
pylint_code = self._run_pylint(args, reporter=reporter, out=out)
@@ -140,8 +140,8 @@ def test_all(self):
ColorizedTextReporter(six.StringIO()),
JSONReporter(six.StringIO())
]
- self._runtest(['pylint/test/functional/arguments.py'],
- reporter=MultiReporter(reporters), code=1)
+ self._runtest([join(HERE, 'functional/arguments.py')],
+ reporter=MultiReporter(reporters), code=2)
def test_no_ext_file(self):
self._runtest([join(HERE, 'input', 'noext')], code=0)
@@ -221,8 +221,9 @@ def test_no_out_encoding(self):
out=strio, code=28)
def test_parallel_execution(self):
- self._runtest(['-j 2', 'pylint/test/functional/arguments.py',
- 'pylint/test/functional/bad_continuation.py'], code=1)
+ self._runtest(['-j 2',
+ join(HERE, 'functional/arguments.py'),
+ join(HERE, 'functional/bad_continuation.py')], code=18)
def test_parallel_execution_missing_arguments(self):
self._runtest(['-j 2', 'not_here', 'not_here_too'], code=1)