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:
@@ -116,11 +116,11 @@ def dummy_yaml_custom_test(testdir):
|
||||
|
||||
def pytest_collect_file(parent, path):
|
||||
if path.ext == ".yaml" and path.basename.startswith("test"):
|
||||
return YamlFile(path, parent)
|
||||
return YamlFile.from_parent(fspath=path, parent=parent)
|
||||
|
||||
class YamlFile(pytest.File):
|
||||
def collect(self):
|
||||
yield YamlItem(self.fspath.basename, self)
|
||||
yield YamlItem.from_parent(name=self.fspath.basename, parent=self)
|
||||
|
||||
class YamlItem(pytest.Item):
|
||||
def runtest(self):
|
||||
|
||||
Reference in New Issue
Block a user