Fixed E121 flake8 errors
continuation line under-indented for hanging indent
This commit is contained in:
parent
64a4b9058c
commit
0be97624b7
|
@ -527,7 +527,7 @@ class FixtureRequest(FuncargnamesCompatAttr):
|
||||||
fail("ScopeMismatch: You tried to access the %r scoped "
|
fail("ScopeMismatch: You tried to access the %r scoped "
|
||||||
"fixture %r with a %r scoped request object, "
|
"fixture %r with a %r scoped request object, "
|
||||||
"involved factories\n%s" % (
|
"involved factories\n%s" % (
|
||||||
(requested_scope, argname, invoking_scope, "\n".join(lines))),
|
(requested_scope, argname, invoking_scope, "\n".join(lines))),
|
||||||
pytrace=False)
|
pytrace=False)
|
||||||
|
|
||||||
def _factorytraceback(self):
|
def _factorytraceback(self):
|
||||||
|
|
|
@ -200,5 +200,5 @@ class WarningsChecker(WarningsRecorder):
|
||||||
from _pytest.runner import fail
|
from _pytest.runner import fail
|
||||||
fail("DID NOT WARN. No warnings of type {0} was emitted. "
|
fail("DID NOT WARN. No warnings of type {0} was emitted. "
|
||||||
"The list of emitted warnings is: {1}.".format(
|
"The list of emitted warnings is: {1}.".format(
|
||||||
self.expected_warning,
|
self.expected_warning,
|
||||||
[each.message for each in self]))
|
[each.message for each in self]))
|
||||||
|
|
|
@ -414,7 +414,7 @@ class SetupState(object):
|
||||||
colitem.teardown()
|
colitem.teardown()
|
||||||
for colitem in self._finalizers:
|
for colitem in self._finalizers:
|
||||||
assert colitem is None or colitem in self.stack \
|
assert colitem is None or colitem in self.stack \
|
||||||
or isinstance(colitem, tuple)
|
or isinstance(colitem, tuple)
|
||||||
|
|
||||||
def teardown_all(self):
|
def teardown_all(self):
|
||||||
while self.stack:
|
while self.stack:
|
||||||
|
|
|
@ -186,15 +186,15 @@ class TestApprox(object):
|
||||||
|
|
||||||
def test_expecting_zero(self):
|
def test_expecting_zero(self):
|
||||||
examples = [
|
examples = [
|
||||||
(ne, 1e-6, 0.0),
|
(ne, 1e-6, 0.0),
|
||||||
(ne, -1e-6, 0.0),
|
(ne, -1e-6, 0.0),
|
||||||
(eq, 1e-12, 0.0),
|
(eq, 1e-12, 0.0),
|
||||||
(eq, -1e-12, 0.0),
|
(eq, -1e-12, 0.0),
|
||||||
(ne, 2e-12, 0.0),
|
(ne, 2e-12, 0.0),
|
||||||
(ne, -2e-12, 0.0),
|
(ne, -2e-12, 0.0),
|
||||||
(ne, inf, 0.0),
|
(ne, inf, 0.0),
|
||||||
(ne, nan, 0.0),
|
(ne, nan, 0.0),
|
||||||
]
|
]
|
||||||
for op, a, x in examples:
|
for op, a, x in examples:
|
||||||
assert op(a, approx(x, rel=0.0, abs=1e-12))
|
assert op(a, approx(x, rel=0.0, abs=1e-12))
|
||||||
assert op(a, approx(x, rel=1e-6, abs=1e-12))
|
assert op(a, approx(x, rel=1e-6, abs=1e-12))
|
||||||
|
|
|
@ -2659,18 +2659,16 @@ class TestShowFixtures(object):
|
||||||
def test_show_fixtures(self, testdir):
|
def test_show_fixtures(self, testdir):
|
||||||
result = testdir.runpytest("--fixtures")
|
result = testdir.runpytest("--fixtures")
|
||||||
result.stdout.fnmatch_lines([
|
result.stdout.fnmatch_lines([
|
||||||
"*tmpdir*",
|
"*tmpdir*",
|
||||||
"*temporary directory*",
|
"*temporary directory*",
|
||||||
]
|
])
|
||||||
)
|
|
||||||
|
|
||||||
def test_show_fixtures_verbose(self, testdir):
|
def test_show_fixtures_verbose(self, testdir):
|
||||||
result = testdir.runpytest("--fixtures", "-v")
|
result = testdir.runpytest("--fixtures", "-v")
|
||||||
result.stdout.fnmatch_lines([
|
result.stdout.fnmatch_lines([
|
||||||
"*tmpdir*--*tmpdir.py*",
|
"*tmpdir*--*tmpdir.py*",
|
||||||
"*temporary directory*",
|
"*temporary directory*",
|
||||||
]
|
])
|
||||||
)
|
|
||||||
|
|
||||||
def test_show_fixtures_testmodule(self, testdir):
|
def test_show_fixtures_testmodule(self, testdir):
|
||||||
p = testdir.makepyfile('''
|
p = testdir.makepyfile('''
|
||||||
|
|
|
@ -222,7 +222,7 @@ class TestCollectonly(object):
|
||||||
""")
|
""")
|
||||||
result = testdir.runpytest("--collect-only",)
|
result = testdir.runpytest("--collect-only",)
|
||||||
result.stdout.fnmatch_lines([
|
result.stdout.fnmatch_lines([
|
||||||
"<Module 'test_collectonly_basic.py'>",
|
"<Module 'test_collectonly_basic.py'>",
|
||||||
" <Function 'test_func'>",
|
" <Function 'test_func'>",
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ class TestFixtureReporting(object):
|
||||||
"*def test_fail():",
|
"*def test_fail():",
|
||||||
"*failingfunc*",
|
"*failingfunc*",
|
||||||
"*1 failed*1 error*",
|
"*1 failed*1 error*",
|
||||||
])
|
])
|
||||||
|
|
||||||
def test_setup_teardown_output_and_test_failure(self, testdir):
|
def test_setup_teardown_output_and_test_failure(self, testdir):
|
||||||
""" Test for issue #442 """
|
""" Test for issue #442 """
|
||||||
|
@ -403,7 +403,7 @@ class TestFixtureReporting(object):
|
||||||
"*teardown func*",
|
"*teardown func*",
|
||||||
|
|
||||||
"*1 failed*",
|
"*1 failed*",
|
||||||
])
|
])
|
||||||
|
|
||||||
class TestTerminalFunctional(object):
|
class TestTerminalFunctional(object):
|
||||||
def test_deselected(self, testdir):
|
def test_deselected(self, testdir):
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -196,6 +196,6 @@ filterwarnings =
|
||||||
ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning
|
ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning
|
||||||
|
|
||||||
[flake8]
|
[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
|
max-line-length = 120
|
||||||
exclude = _pytest/vendored_packages/pluggy.py
|
exclude = _pytest/vendored_packages/pluggy.py
|
||||||
|
|
Loading…
Reference in New Issue