From 6587eaaf0fa5e5ac7b048aea0ad6de3689fd78bd Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 24 Jul 2017 18:16:03 +0200 Subject: [PATCH] [IMP] test_pylint: do not load default config file This will avoid useless warning when the file does not exists and possible false positive errors in case of invalid config in this file. Also strip output Cherry-pick of c955c3051cc6c68a39340e146c4120d514b61437 --- odoo/addons/test_pylint/tests/test_pylint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/odoo/addons/test_pylint/tests/test_pylint.py b/odoo/addons/test_pylint/tests/test_pylint.py index 51a63a6d4fa..86d193b161d 100644 --- a/odoo/addons/test_pylint/tests/test_pylint.py +++ b/odoo/addons/test_pylint/tests/test_pylint.py @@ -122,6 +122,7 @@ class TestPyLint(TransactionCase): paths.append(module_path) options = [ + '--rcfile=%s' % os.devnull, '--disable=all', '--enable=%s' % ','.join(self.ENABLED_CODES), '--reports=n', @@ -146,4 +147,4 @@ class TestPyLint(TransactionCase): else: out, err = process.communicate() if process.returncode: - self.fail((b"\n" + out + b"\n" + err).decode('utf-8')) + self.fail("pylint test failed:\n" + (b"\n" + out + b"\n" + err).decode('utf-8').strip())