From bec1cbde23681595952b3604448b323000a2b49e Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Thu, 12 Aug 2021 10:28:03 +0200 Subject: Update pylint to 2.9.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It stops filtering upper constraints by versions as python 2 (and 3.5) dropped. Change-Id: Ieb96d068ebda813e020a093f3291b4a9526402e4 Signed-off-by: Cédric Ollivier --- xtesting/core/unit.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'xtesting/core/unit.py') diff --git a/xtesting/core/unit.py b/xtesting/core/unit.py index 8bcf163a..e6c3cd87 100644 --- a/xtesting/core/unit.py +++ b/xtesting/core/unit.py @@ -43,10 +43,11 @@ class Suite(testcase.TestCase): Exception """ stream.seek(0) - stats = subprocess.Popen( - ['subunit-stats'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) - output, _ = stats.communicate(stream.read()) - cls.__logger.info("\n\n%s", output.decode("utf-8")) + with subprocess.Popen( + ['subunit-stats'], stdin=subprocess.PIPE, + stdout=subprocess.PIPE) as stats: + output, _ = stats.communicate(stream.read()) + cls.__logger.info("\n\n%s", output.decode("utf-8")) def generate_xunit(self, stream): """Generate junit report from subunit stream @@ -56,11 +57,11 @@ class Suite(testcase.TestCase): """ stream.seek(0) with open("{}/results.xml".format(self.res_dir), "w") as xml: - stats = subprocess.Popen( - ['subunit2junitxml'], stdin=subprocess.PIPE, - stdout=subprocess.PIPE) - output, _ = stats.communicate(stream.read()) - xml.write(output.decode("utf-8")) + with subprocess.Popen( + ['subunit2junitxml'], stdin=subprocess.PIPE, + stdout=subprocess.PIPE) as stats: + output, _ = stats.communicate(stream.read()) + xml.write(output.decode("utf-8")) def generate_html(self, stream): """Generate html report from subunit stream -- cgit 1.2.3-korg