diff --git a/_pytest/fixtures.py b/_pytest/fixtures.py index f6a4be790..593e80b90 100644 --- a/_pytest/fixtures.py +++ b/_pytest/fixtures.py @@ -527,7 +527,7 @@ class FixtureRequest(FuncargnamesCompatAttr): fail("ScopeMismatch: You tried to access the %r scoped " "fixture %r with a %r scoped request object, " "involved factories\n%s" % ( - (requested_scope, argname, invoking_scope, "\n".join(lines))), + (requested_scope, argname, invoking_scope, "\n".join(lines))), pytrace=False) def _factorytraceback(self): diff --git a/_pytest/recwarn.py b/_pytest/recwarn.py index 9cc404a49..cc7874550 100644 --- a/_pytest/recwarn.py +++ b/_pytest/recwarn.py @@ -200,5 +200,5 @@ class WarningsChecker(WarningsRecorder): from _pytest.runner import fail fail("DID NOT WARN. No warnings of type {0} was emitted. " "The list of emitted warnings is: {1}.".format( - self.expected_warning, + self.expected_warning, [each.message for each in self])) diff --git a/_pytest/runner.py b/_pytest/runner.py index fd0b549a9..5f4093b1d 100644 --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -414,7 +414,7 @@ class SetupState(object): colitem.teardown() for colitem in self._finalizers: assert colitem is None or colitem in self.stack \ - or isinstance(colitem, tuple) + or isinstance(colitem, tuple) def teardown_all(self): while self.stack: diff --git a/testing/python/approx.py b/testing/python/approx.py index d9bbaa4e0..3fac456ff 100644 --- a/testing/python/approx.py +++ b/testing/python/approx.py @@ -186,15 +186,15 @@ class TestApprox(object): def test_expecting_zero(self): examples = [ - (ne, 1e-6, 0.0), - (ne, -1e-6, 0.0), - (eq, 1e-12, 0.0), - (eq, -1e-12, 0.0), - (ne, 2e-12, 0.0), - (ne, -2e-12, 0.0), - (ne, inf, 0.0), - (ne, nan, 0.0), - ] + (ne, 1e-6, 0.0), + (ne, -1e-6, 0.0), + (eq, 1e-12, 0.0), + (eq, -1e-12, 0.0), + (ne, 2e-12, 0.0), + (ne, -2e-12, 0.0), + (ne, inf, 0.0), + (ne, nan, 0.0), + ] for op, a, x in examples: assert op(a, approx(x, rel=0.0, abs=1e-12)) assert op(a, approx(x, rel=1e-6, abs=1e-12)) diff --git a/testing/python/fixture.py b/testing/python/fixture.py index ff49346c6..de41aaca1 100644 --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -2659,18 +2659,16 @@ class TestShowFixtures(object): def test_show_fixtures(self, testdir): result = testdir.runpytest("--fixtures") result.stdout.fnmatch_lines([ - "*tmpdir*", - "*temporary directory*", - ] - ) + "*tmpdir*", + "*temporary directory*", + ]) def test_show_fixtures_verbose(self, testdir): result = testdir.runpytest("--fixtures", "-v") result.stdout.fnmatch_lines([ - "*tmpdir*--*tmpdir.py*", - "*temporary directory*", - ] - ) + "*tmpdir*--*tmpdir.py*", + "*temporary directory*", + ]) def test_show_fixtures_testmodule(self, testdir): p = testdir.makepyfile(''' diff --git a/testing/test_terminal.py b/testing/test_terminal.py index 45c354206..51c8d642e 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -222,7 +222,7 @@ class TestCollectonly(object): """) result = testdir.runpytest("--collect-only",) result.stdout.fnmatch_lines([ - "", + "", " ", ]) @@ -378,7 +378,7 @@ class TestFixtureReporting(object): "*def test_fail():", "*failingfunc*", "*1 failed*1 error*", - ]) + ]) def test_setup_teardown_output_and_test_failure(self, testdir): """ Test for issue #442 """ @@ -403,7 +403,7 @@ class TestFixtureReporting(object): "*teardown func*", "*1 failed*", - ]) + ]) class TestTerminalFunctional(object): def test_deselected(self, testdir): diff --git a/tox.ini b/tox.ini index db8f94d07..573eddac4 100644 --- a/tox.ini +++ b/tox.ini @@ -196,6 +196,6 @@ filterwarnings = ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning [flake8] -ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E201,E202,E203,E221,E222,E225,E226,E231,E241,E251,E261,E262,E265,E271,E272,E293,E301,E302,E303,E401,E402,E501,E701,E702,E704,E712,E731 +ignore = E122,E123,E124,E125,E126,E127,E128,E129,E131,E201,E202,E203,E221,E222,E225,E226,E231,E241,E251,E261,E262,E265,E271,E272,E293,E301,E302,E303,E401,E402,E501,E701,E702,E704,E712,E731 max-line-length = 120 exclude = _pytest/vendored_packages/pluggy.py