mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-23 09:47:30 -08:00
While at it, remove bits which are now handled by the eclass. Invoking maintainer time-out. Closes: https://bugs.gentoo.org/737924 Signed-off-by: Marek Szuba <marecki@gentoo.org>
27 lines
958 B
Diff
27 lines
958 B
Diff
--- a/conftest.py
|
|
+++ b/conftest.py
|
|
@@ -11,7 +11,10 @@
|
|
|
|
def pytest_collect_file(path, parent):
|
|
if path.ext == ".docopt" and path.basename.startswith("test"):
|
|
- return DocoptTestFile(path, parent)
|
|
+ if hasattr(DocoptTestFile, "from_parent"):
|
|
+ return DocoptTestFile.from_parent(parent, fspath=path)
|
|
+ else:
|
|
+ return DocoptTestFile(path, parent)
|
|
|
|
|
|
def parse_test(raw):
|
|
@@ -41,7 +44,10 @@
|
|
for name, doc, cases in parse_test(raw):
|
|
name = self.fspath.purebasename
|
|
for case in cases:
|
|
- yield DocoptTestItem("%s(%d)" % (name, index), self, doc, case)
|
|
+ if hasattr(DocoptTestItem, "from_parent"):
|
|
+ yield DocoptTestItem.from_parent(self, name="%s(%d)" % (name, index), doc=doc, case=case)
|
|
+ else:
|
|
+ yield DocoptTestItem("%s(%d)" % (name, index), self, doc, case)
|
|
index += 1
|
|
|
|
|