Fixed E302 flake8 errors
expected 2 blank lines, found 0
This commit is contained in:
@@ -870,6 +870,7 @@ class TestConftestCustomization(object):
|
||||
result = testdir.runpytest_subprocess()
|
||||
result.stdout.fnmatch_lines('*1 passed*')
|
||||
|
||||
|
||||
def test_setup_only_available_in_subdir(testdir):
|
||||
sub1 = testdir.mkpydir("sub1")
|
||||
sub2 = testdir.mkpydir("sub2")
|
||||
@@ -896,6 +897,7 @@ def test_setup_only_available_in_subdir(testdir):
|
||||
result = testdir.runpytest("-v", "-s")
|
||||
result.assert_outcomes(passed=2)
|
||||
|
||||
|
||||
def test_modulecol_roundtrip(testdir):
|
||||
modcol = testdir.getmodulecol("pass", withinit=True)
|
||||
trail = modcol.nodeid
|
||||
@@ -1180,6 +1182,7 @@ def test_collector_attributes(testdir):
|
||||
"*1 passed*",
|
||||
])
|
||||
|
||||
|
||||
def test_customize_through_attributes(testdir):
|
||||
testdir.makeconftest("""
|
||||
import pytest
|
||||
|
||||
@@ -7,6 +7,7 @@ from _pytest.pytester import get_public_names
|
||||
from _pytest.fixtures import FixtureLookupError
|
||||
from _pytest import fixtures
|
||||
|
||||
|
||||
def test_getfuncargnames():
|
||||
def f(): pass
|
||||
assert not fixtures.getfuncargnames(f)
|
||||
@@ -28,6 +29,7 @@ def test_getfuncargnames():
|
||||
if sys.version_info < (3, 0):
|
||||
assert fixtures.getfuncargnames(A.f) == ('arg1',)
|
||||
|
||||
|
||||
class TestFillFixtures(object):
|
||||
def test_fillfuncargs_exposed(self):
|
||||
# used by oejskit, kept for compatibility
|
||||
@@ -815,6 +817,7 @@ class TestRequestBasic(object):
|
||||
reprec = testdir.inline_run()
|
||||
reprec.assertoutcome(passed=2)
|
||||
|
||||
|
||||
class TestRequestMarking(object):
|
||||
def test_applymarker(self, testdir):
|
||||
item1, item2 = testdir.getitems("""
|
||||
@@ -875,6 +878,7 @@ class TestRequestMarking(object):
|
||||
reprec = testdir.inline_run()
|
||||
reprec.assertoutcome(passed=2)
|
||||
|
||||
|
||||
class TestRequestCachedSetup(object):
|
||||
def test_request_cachedsetup_defaultmodule(self, testdir):
|
||||
reprec = testdir.inline_runsource("""
|
||||
@@ -1040,6 +1044,7 @@ class TestRequestCachedSetup(object):
|
||||
"*ZeroDivisionError*",
|
||||
])
|
||||
|
||||
|
||||
class TestFixtureUsages(object):
|
||||
def test_noargfixturedec(self, testdir):
|
||||
testdir.makepyfile("""
|
||||
@@ -2587,6 +2592,7 @@ class TestRequestScopeAccess(object):
|
||||
reprec = testdir.inline_run()
|
||||
reprec.assertoutcome(passed=1)
|
||||
|
||||
|
||||
class TestErrors(object):
|
||||
def test_subfactory_missing_funcarg(self, testdir):
|
||||
testdir.makepyfile("""
|
||||
@@ -2651,6 +2657,7 @@ class TestErrors(object):
|
||||
"*1 error*",
|
||||
])
|
||||
|
||||
|
||||
class TestShowFixtures(object):
|
||||
def test_funcarg_compat(self, testdir):
|
||||
config = testdir.parseconfigure("--funcargs")
|
||||
@@ -2919,6 +2926,7 @@ class TestContextManagerFixtureFuncs(object):
|
||||
result = testdir.runpytest("-s")
|
||||
result.stdout.fnmatch_lines("*mew*")
|
||||
|
||||
|
||||
class TestParameterizedSubRequest(object):
|
||||
def test_call_from_fixture(self, testdir):
|
||||
testfile = testdir.makepyfile("""
|
||||
|
||||
@@ -76,6 +76,7 @@ def test_wrapped_getfslineno():
|
||||
fs2, lineno2 = python.getfslineno(wrap)
|
||||
assert lineno > lineno2, "getfslineno does not unwrap correctly"
|
||||
|
||||
|
||||
class TestMockDecoration(object):
|
||||
def test_wrapped_getfuncargnames(self):
|
||||
from _pytest.compat import getfuncargnames
|
||||
@@ -246,6 +247,7 @@ class TestReRunTests(object):
|
||||
*2 passed*
|
||||
""")
|
||||
|
||||
|
||||
def test_pytestconfig_is_session_scoped():
|
||||
from _pytest.fixtures import pytestconfig
|
||||
assert pytestconfig._pytestfixturefunction.scope == "session"
|
||||
|
||||
Reference in New Issue
Block a user