diff --git a/_pytest/fixtures.py b/_pytest/fixtures.py index c10bde4d9..7ff41d7d4 100644 --- a/_pytest/fixtures.py +++ b/_pytest/fixtures.py @@ -569,7 +569,7 @@ class SubRequest(FixtureRequest): self._fixturedef = fixturedef self.addfinalizer = fixturedef.addfinalizer self._pyfuncitem = request._pyfuncitem - self._fixture_values = request._fixture_values + self._fixture_values = request._fixture_values self._fixture_defs = request._fixture_defs self._arg2fixturedefs = request._arg2fixturedefs self._arg2index = request._arg2index diff --git a/_pytest/pytester.py b/_pytest/pytester.py index d85cb45db..4fc90e98c 100644 --- a/_pytest/pytester.py +++ b/_pytest/pytester.py @@ -406,7 +406,7 @@ class Testdir: def __init__(self, request, tmpdir_factory): self.request = request - self._mod_collections = WeakKeyDictionary() + self._mod_collections = WeakKeyDictionary() # XXX remove duplication with tmpdir plugin basetmp = tmpdir_factory.ensuretemp("testdir") name = request.function.__name__ diff --git a/_pytest/warnings.py b/_pytest/warnings.py index 4fe28bd31..915862a9d 100644 --- a/_pytest/warnings.py +++ b/_pytest/warnings.py @@ -78,7 +78,7 @@ def catch_warnings_for_item(item): if unicode_warning: warnings.warn( "Warning is using unicode non convertible to ascii, " - "converting to a safe representation:\n %s" % msg, + "converting to a safe representation:\n %s" % msg, UnicodeWarning) diff --git a/testing/code/test_excinfo.py b/testing/code/test_excinfo.py index e5946f61e..73fd51595 100644 --- a/testing/code/test_excinfo.py +++ b/testing/code/test_excinfo.py @@ -1017,18 +1017,18 @@ raise ValueError() tw = TWMock() r.toterminal(tw) for line in tw.lines: print (line) - assert tw.lines[0] == "" - assert tw.lines[1] == " def f():" - assert tw.lines[2] == " try:" - assert tw.lines[3] == "> g()" - assert tw.lines[4] == "" + assert tw.lines[0] == "" + assert tw.lines[1] == " def f():" + assert tw.lines[2] == " try:" + assert tw.lines[3] == "> g()" + assert tw.lines[4] == "" line = tw.get_write_msg(5) assert line.endswith('mod.py') - assert tw.lines[6] == ':6: ' - assert tw.lines[7] == ("_ ", None) - assert tw.lines[8] == "" - assert tw.lines[9] == " def g():" - assert tw.lines[10] == "> raise ValueError()" + assert tw.lines[6] == ':6: ' + assert tw.lines[7] == ("_ ", None) + assert tw.lines[8] == "" + assert tw.lines[9] == " def g():" + assert tw.lines[10] == "> raise ValueError()" assert tw.lines[11] == "E ValueError" assert tw.lines[12] == "" line = tw.get_write_msg(13) diff --git a/tox.ini b/tox.ini index e1c2392c6..3f8e590c6 100644 --- a/tox.ini +++ b/tox.ini @@ -196,6 +196,6 @@ filterwarnings = ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning [flake8] -ignore = 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 = 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