[Piglit] [PATCH] junit.py: Fix PEP 8 issues.
Dylan Baker
baker.dylan.c at gmail.com
Tue Mar 17 10:26:24 PDT 2015
Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>
On Mon, Mar 16, 2015 at 11:30:49PM -0700, Vinson Lee wrote:
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> framework/backends/junit.py | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/framework/backends/junit.py b/framework/backends/junit.py
> index 53b6086..98a85b6 100644
> --- a/framework/backends/junit.py
> +++ b/framework/backends/junit.py
> @@ -120,7 +120,7 @@ class JUnitBackend(FileBackend):
> if lname in self._expected_failures:
> expected_result = "failure"
> # a test can either fail or crash, but not both
> - assert( lname not in self._expected_crashes )
> + assert lname not in self._expected_crashes
>
> if lname in self._expected_crashes:
> expected_result = "error"
> @@ -131,17 +131,20 @@ class JUnitBackend(FileBackend):
> if data['result'] == 'skip':
> res = etree.SubElement(element, 'skipped')
>
> - elif data['result'] in ['warn', 'fail', 'dmesg-warn', 'dmesg-fail']:
> + elif data['result'] in ['warn', 'fail', 'dmesg-warn',
> + 'dmesg-fail']:
> if expected_result == "failure":
> err.text += "\n\nWARN: passing test as an expected failure"
> - res = etree.SubElement(element, 'skipped', message='expected failure')
> + res = etree.SubElement(element, 'skipped',
> + message='expected failure')
> else:
> res = etree.SubElement(element, 'failure')
>
> elif data['result'] == 'crash':
> if expected_result == "error":
> err.text += "\n\nWARN: passing test as an expected crash"
> - res = etree.SubElement(element, 'skipped', message='expected crash')
> + res = etree.SubElement(element, 'skipped',
> + message='expected crash')
> else:
> res = etree.SubElement(element, 'error')
>
> --
> 2.3.2
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150317/ab67da72/attachment-0001.sig>
More information about the Piglit
mailing list