From a44776ed48755de7c7a0860cdba078b363b3d2b6 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 11 Dec 2018 15:16:11 -0200 Subject: [PATCH] Fix linting --- src/_pytest/junitxml.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/_pytest/junitxml.py b/src/_pytest/junitxml.py index c5cc2b0a9..eed2a9a77 100644 --- a/src/_pytest/junitxml.py +++ b/src/_pytest/junitxml.py @@ -371,8 +371,9 @@ def mangle_test_address(address): class LogXML(object): - def __init__(self, logfile, prefix, suite_name="pytest", logging="no", - report_duration=None): + def __init__( + self, logfile, prefix, suite_name="pytest", logging="no", report_duration=None + ): logfile = os.path.expanduser(os.path.expandvars(logfile)) self.logfile = os.path.normpath(os.path.abspath(logfile)) self.prefix = prefix @@ -512,8 +513,11 @@ class LogXML(object): """accumulates total duration for nodeid from given report and updates the Junit.testcase with the new total if already created. """ - if not self.report_duration or self.report_duration == "total" or \ - report.when == self.report_duration: + if ( + not self.report_duration + or self.report_duration == "total" + or report.when == self.report_duration + ): reporter = self.node_reporter(report) reporter.duration += getattr(report, "duration", 0.0)