diff --git a/_pytest/pytester.py b/_pytest/pytester.py index bbe95f504..3c3a0d3b7 100644 --- a/_pytest/pytester.py +++ b/_pytest/pytester.py @@ -821,7 +821,7 @@ class Testdir: self.request.addfinalizer(config._ensure_unconfigure) return config - def getitem(self, source, funcname="test_func"): + def getitem(self, source, funcname="test_func"): """Return the test item for a test function. This writes the source to a python file and runs pytest's @@ -841,7 +841,7 @@ class Testdir: assert 0, "%r item not found in module:\n%s\nitems: %s" % ( funcname, source, items) - def getitems(self, source): + def getitems(self, source): """Return all test items collected from the module. This writes the source to a python file and runs pytest's @@ -852,7 +852,7 @@ class Testdir: modcol = self.getmodulecol(source) return self.genitems([modcol]) - def getmodulecol(self, source, configargs=(), withinit=False): + def getmodulecol(self, source, configargs=(), withinit=False): """Return the module collection node for ``source``. This writes ``source`` to a file using :py:meth:`makepyfile` @@ -1066,7 +1066,7 @@ class LineMatcher: """ - def __init__(self, lines): + def __init__(self, lines): self.lines = lines self._log_output = [] diff --git a/testing/test_conftest.py b/testing/test_conftest.py index 7fdddb0d5..dd696fe5b 100644 --- a/testing/test_conftest.py +++ b/testing/test_conftest.py @@ -320,28 +320,28 @@ class TestConftestVisibility(object): # "snc" stands for "subdir no [i.e. without] conftest.py" @pytest.mark.parametrize("chdir,testarg,expect_ntests_passed", [ # Effective target: package/.. - ("runner", "..", 3), - ("package", "..", 3), - ("swc", "../..", 3), - ("snc", "../..", 3), + ("runner", "..", 3), + ("package", "..", 3), + ("swc", "../..", 3), + ("snc", "../..", 3), # Effective target: package - ("runner", "../package", 3), - ("package", ".", 3), - ("swc", "..", 3), - ("snc", "..", 3), + ("runner", "../package", 3), + ("package", ".", 3), + ("swc", "..", 3), + ("snc", "..", 3), # Effective target: package/swc - ("runner", "../package/swc", 1), - ("package", "./swc", 1), - ("swc", ".", 1), - ("snc", "../swc", 1), + ("runner", "../package/swc", 1), + ("package", "./swc", 1), + ("swc", ".", 1), + ("snc", "../swc", 1), # Effective target: package/snc - ("runner", "../package/snc", 1), - ("package", "./snc", 1), - ("swc", "../snc", 1), - ("snc", ".", 1), + ("runner", "../package/snc", 1), + ("package", "./snc", 1), + ("swc", "../snc", 1), + ("snc", ".", 1), ]) @pytest.mark.issue616 def test_parsefactories_relative_node_ids( diff --git a/testing/test_doctest.py b/testing/test_doctest.py index 9f7138ebd..ec3f8ba7a 100644 --- a/testing/test_doctest.py +++ b/testing/test_doctest.py @@ -135,9 +135,9 @@ class TestDoctests(object): @pytest.mark.parametrize( ' test_string, encoding', [ - (u'foo', 'ascii'), - (u'öäü', 'latin1'), - (u'öäü', 'utf-8') + (u'foo', 'ascii'), + (u'öäü', 'latin1'), + (u'öäü', 'utf-8') ] ) def test_encoding(self, testdir, test_string, encoding): diff --git a/tox.ini b/tox.ini index 473ac3fd7..3969897e7 100644 --- a/tox.ini +++ b/tox.ini @@ -196,6 +196,6 @@ filterwarnings = ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning [flake8] -ignore = E241,E251,E261,E262,E265,E271,E272,E293,E301,E302,E303,E401,E402,E501,E701,E702,E704,E712,E731 +ignore = 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