From 24da93832138b048c9126bbd7f1ab7bf6c091edf Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 19 Jul 2017 17:42:21 -0300 Subject: [PATCH] Fix additional flake8 errors --- testing/code/test_source.py | 3 ++- testing/python/approx.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/testing/code/test_source.py b/testing/code/test_source.py index 6432bf95c..f8b6af3ee 100644 --- a/testing/code/test_source.py +++ b/testing/code/test_source.py @@ -342,7 +342,8 @@ def test_getstartingblock_multiline(): self.source = _pytest._code.Frame(frame).statement x = A('x', - 'y', + 'y' + , 'z') l = [i for i in x.source.lines if i.strip()] diff --git a/testing/python/approx.py b/testing/python/approx.py index ebd0234de..876226e06 100644 --- a/testing/python/approx.py +++ b/testing/python/approx.py @@ -29,7 +29,9 @@ class TestApprox(object): if sys.version_info[:2] == (2, 6): tol1, tol2, infr = '???', '???', '???' assert repr(approx(1.0)) == '1.0 {pm} {tol1}'.format(pm=plus_minus, tol1=tol1) - assert repr(approx([1.0, 2.0])) == '1.0 {pm} {tol1}, 2.0 {pm} {tol2}'.format( + assert repr(approx([1.0, 2.0])) == 'approx([1.0 {pm} {tol1}, 2.0 {pm} {tol2}])'.format( + pm=plus_minus, tol1=tol1, tol2=tol2) + assert repr(approx((1.0, 2.0))) == 'approx((1.0 {pm} {tol1}, 2.0 {pm} {tol2}))'.format( pm=plus_minus, tol1=tol1, tol2=tol2) assert repr(approx(inf)) == 'inf' assert repr(approx(1.0, rel=nan)) == '1.0 {pm} ???'.format(pm=plus_minus)