allow to use pytest.fixture decorator on old-style pytest_funcarg__NAME definitions.
This commit is contained in:
@@ -195,3 +195,16 @@ class TestReRunTests:
|
||||
def test_pytestconfig_is_session_scoped():
|
||||
from _pytest.python import pytestconfig
|
||||
assert pytestconfig._pytestfixturefunction.scope == "session"
|
||||
|
||||
def test_funcarg_prefix_and_marker(testdir):
|
||||
testdir.makepyfile("""
|
||||
import pytest
|
||||
@pytest.fixture
|
||||
def pytest_funcarg__foo():
|
||||
return 1
|
||||
|
||||
def test_hello(foo):
|
||||
assert foo == 1
|
||||
""")
|
||||
reprec = testdir.inline_run()
|
||||
reprec.assertoutcome(passed=1)
|
||||
|
||||
Reference in New Issue
Block a user