summary refs log tree commit diff
path: root/gnu/packages/patches/python-docopt-pytest6-compat.patch
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-09-22 06:25:20 +0000
committerMathieu Othacehe <othacehe@gnu.org>2021-09-22 06:25:20 +0000
commit0cccc2f52cedd9b0e0646cc4d3ae64a886f2db6b (patch)
treed9724175476a27a7234140519e035c8d4c79aedc /gnu/packages/patches/python-docopt-pytest6-compat.patch
parent22f7d4bce1e694b7ac38e62410d76a6d46d96c5d (diff)
parentd58e52b0713648dd30d41b41277854a935d8d15a (diff)
downloadguix-0cccc2f52cedd9b0e0646cc4d3ae64a886f2db6b.tar.gz
Merge remote-tracking branch core-updates-frozen into core-updates
Diffstat (limited to 'gnu/packages/patches/python-docopt-pytest6-compat.patch')
-rw-r--r--gnu/packages/patches/python-docopt-pytest6-compat.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-docopt-pytest6-compat.patch b/gnu/packages/patches/python-docopt-pytest6-compat.patch
new file mode 100644
index 0000000000..acd4955778
--- /dev/null
+++ b/gnu/packages/patches/python-docopt-pytest6-compat.patch
@@ -0,0 +1,29 @@
+https://sources.debian.org/data/main/d/docopt/0.6.2-3/debian/patches/pytest6
+
+From: Michael R. Crusoe <crusoe@debian.org>
+Subject: fix for pytest 6.x comptability
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=979285
+
+--- docopt.orig/conftest.py
++++ docopt/conftest.py
+@@ -11,6 +11,8 @@
+ 
+ def pytest_collect_file(path, parent):
+     if path.ext == ".docopt" and path.basename.startswith("test"):
++        if hasattr(DocoptTestFile, "from_parent"):
++            return DocoptTestFile.from_parent(parent, fspath=path)
+         return DocoptTestFile(path, parent)
+ 
+ 
+@@ -41,7 +43,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
+ 
+