fixtures: deprecate pytest._fillfuncargs function
This function is exposed and kept alive for the oejskit plugin which is abandoned and no longer works with recent plugins, so let's prepare to completely remove it.
This commit is contained in:
@@ -110,7 +110,7 @@ class TestFillFixtures:
|
||||
def test_funcarg_basic(self, testdir):
|
||||
testdir.copy_example()
|
||||
item = testdir.getitem(Path("test_funcarg_basic.py"))
|
||||
fixtures.fillfixtures(item)
|
||||
item._request._fillfixtures()
|
||||
del item.funcargs["request"]
|
||||
assert len(get_public_names(item.funcargs)) == 2
|
||||
assert item.funcargs["some"] == "test_func"
|
||||
@@ -664,7 +664,7 @@ class TestRequestBasic:
|
||||
assert val2 == 2
|
||||
val2 = req.getfixturevalue("other") # see about caching
|
||||
assert val2 == 2
|
||||
pytest._fillfuncargs(item)
|
||||
item._request._fillfixtures()
|
||||
assert item.funcargs["something"] == 1
|
||||
assert len(get_public_names(item.funcargs)) == 2
|
||||
assert "request" in item.funcargs
|
||||
@@ -681,7 +681,7 @@ class TestRequestBasic:
|
||||
"""
|
||||
)
|
||||
item.session._setupstate.prepare(item)
|
||||
pytest._fillfuncargs(item)
|
||||
item._request._fillfixtures()
|
||||
# successively check finalization calls
|
||||
teardownlist = item.getparent(pytest.Module).obj.teardownlist
|
||||
ss = item.session._setupstate
|
||||
|
||||
@@ -4,7 +4,7 @@ from _pytest import runner
|
||||
|
||||
|
||||
class TestOEJSKITSpecials:
|
||||
def test_funcarg_non_pycollectobj(self, testdir): # rough jstests usage
|
||||
def test_funcarg_non_pycollectobj(self, testdir, recwarn): # rough jstests usage
|
||||
testdir.makeconftest(
|
||||
"""
|
||||
import pytest
|
||||
@@ -34,7 +34,7 @@ class TestOEJSKITSpecials:
|
||||
pytest._fillfuncargs(clscol)
|
||||
assert clscol.funcargs["arg1"] == 42
|
||||
|
||||
def test_autouse_fixture(self, testdir): # rough jstests usage
|
||||
def test_autouse_fixture(self, testdir, recwarn): # rough jstests usage
|
||||
testdir.makeconftest(
|
||||
"""
|
||||
import pytest
|
||||
|
||||
Reference in New Issue
Block a user