unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob acd4955778800c6ccd7dd1a2e4f18c878cc9769d 1119 bytes (raw)
name: packages/patches/python-docopt-pytest6-compat.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
 
 

debug log:

solving acd4955778800c6ccd7dd1a2e4f18c878cc9769d ...
found acd4955778800c6ccd7dd1a2e4f18c878cc9769d in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).