diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-06-24 14:47:38 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-06-24 14:47:38 +0100 |
commit | b4d43e8c611df4a8061b6f88d9e9f6b1e3c83903 (patch) | |
tree | 911928b566777494d08ebe2c16cb64f15af71901 /dev-python/docopt/files | |
parent | 61f10f985e19dfe20a4d9552902625edd5b6eabb (diff) |
gentoo resync : 24.06.2021
Diffstat (limited to 'dev-python/docopt/files')
-rw-r--r-- | dev-python/docopt/files/docopt-0.6.2-pytest_node_from_parent.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/dev-python/docopt/files/docopt-0.6.2-pytest_node_from_parent.patch b/dev-python/docopt/files/docopt-0.6.2-pytest_node_from_parent.patch new file mode 100644 index 000000000000..bf6ef1f80346 --- /dev/null +++ b/dev-python/docopt/files/docopt-0.6.2-pytest_node_from_parent.patch @@ -0,0 +1,26 @@ +--- 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 + + |