From 05abc1faed4e348488f730407c771661449d82f3 Mon Sep 17 00:00:00 2001 From: xmo-odoo Date: Thu, 11 May 2017 15:05:01 +0200 Subject: [PATCH] [FIX] test_pylint: pylint error output to failure Sometimes PyLint itself blows up which fails the test but does not provide any indication as to why, which is inconvenient. --- odoo/addons/test_pylint/tests/test_pylint.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/odoo/addons/test_pylint/tests/test_pylint.py b/odoo/addons/test_pylint/tests/test_pylint.py index 26a8e534686..c5edead5a0d 100644 --- a/odoo/addons/test_pylint/tests/test_pylint.py +++ b/odoo/addons/test_pylint/tests/test_pylint.py @@ -116,11 +116,10 @@ class TestPyLint(TransactionCase): ] try: - with open(devnull, 'w') as devnull_file: - process = subprocess.Popen(['pylint'] + options + paths, stdout=subprocess.PIPE, stderr=devnull_file) + process = subprocess.Popen(['pylint'] + options + paths, stdout=subprocess.PIPE, stderr=subprocess.PIPE) except (OSError, IOError): self._skip_test('pylint executable not found in the path') else: - out = process.communicate()[0] + out, err = process.communicate() if process.returncode: - self.fail("\n" + out) + self.fail("\n" + out + "\n" + err)