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 "
|
||||
"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):
|
||||
|
|
|
@ -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]))
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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('''
|
||||
|
|
|
@ -222,7 +222,7 @@ class TestCollectonly(object):
|
|||
""")
|
||||
result = testdir.runpytest("--collect-only",)
|
||||
result.stdout.fnmatch_lines([
|
||||
"<Module 'test_collectonly_basic.py'>",
|
||||
"<Module 'test_collectonly_basic.py'>",
|
||||
" <Function 'test_func'>",
|
||||
])
|
||||
|
||||
|
@ -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):
|
||||
|
|
2
tox.ini
2
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
|
||||
|
|
Loading…
Reference in New Issue