Change pytest deprecation warnings into errors for 6.0 release (#7362)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
This commit is contained in:
Bruno Oliveira
2020-07-22 21:36:51 -03:00
committed by GitHub
parent a9799f0b35
commit 7ec6401ffa
19 changed files with 122 additions and 84 deletions

View File

@@ -762,7 +762,7 @@ class TestConftestCustomization:
pass
def pytest_pycollect_makemodule(path, parent):
if path.basename == "test_xyz.py":
return MyModule(path, parent)
return MyModule.from_parent(fspath=path, parent=parent)
"""
)
testdir.makepyfile("def test_some(): pass")
@@ -836,7 +836,7 @@ class TestConftestCustomization:
pass
def pytest_pycollect_makeitem(collector, name, obj):
if name == "some":
return MyFunction(name, collector)
return MyFunction.from_parent(name=name, parent=collector)
"""
)
testdir.makepyfile("def some(): pass")
@@ -873,7 +873,7 @@ class TestConftestCustomization:
def pytest_collect_file(path, parent):
if path.ext == ".narf":
return Module(path, parent)"""
return Module.from_parent(fspath=path, parent=parent)"""
)
testdir.makefile(
".narf",