unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
blob 30ab618ff15cf44fbfba316a81688396d28da8ef 1488 bytes (raw)
name: gnu/packages/patches/python-dendropy-fix-tests.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
30
31
32
33
34
35
36
37
38
39
40
41
 
This patch fixes two test failures.  It was downloaded from:
https://github.com/jeetsukumaran/DendroPy/commit/93f984bba7a6c588a28ca87f4e557ce283809453

From 93f984bba7a6c588a28ca87f4e557ce283809453 Mon Sep 17 00:00:00 2001
From: jeetsukumaran <jeetsukumaran@gmail.com>
Date: Tue, 21 Feb 2017 16:41:01 -0500
Subject: [PATCH] Update to Python 3 container and iteration semantics

---
 dendropy/dataio/newickreader.py | 3 ++-
 dendropy/datamodel/treemodel.py | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/dendropy/dataio/newickreader.py b/dendropy/dataio/newickreader.py
index 6dcf3c5..f978729 100644
--- a/dendropy/dataio/newickreader.py
+++ b/dendropy/dataio/newickreader.py
@@ -303,7 +303,8 @@ def tree_iter(self,
                     taxon_symbol_map_fn=taxon_symbol_mapper.require_taxon_for_symbol)
             yield tree
             if tree is None:
-                raise StopIteration
+                # raise StopIteration
+                return
 
     def _read(self,
             stream,
diff --git a/dendropy/datamodel/treemodel.py b/dendropy/datamodel/treemodel.py
index 0ecfe31..73146f0 100644
--- a/dendropy/datamodel/treemodel.py
+++ b/dendropy/datamodel/treemodel.py
@@ -772,6 +772,9 @@ def __hash__(self):
     def __eq__(self, other):
         return self is other
 
+    def __lt__(self, other):
+        return id(self) < id(other)
+
     ###########################################################################
     ### Basic Structure
 

debug log:

solving 30ab618ff ...
found 30ab618ff 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).