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

@@ -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):