jlec        15/03/26 12:17:18

  Added:                biopython-1.65-test-fix-backport.patch
  Log:
  Backport test fix
  
  (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 
B9D4F231BD1558AB!)

Revision  Changes    Path
1.1                  
sci-biology/biopython/files/biopython-1.65-test-fix-backport.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/biopython/files/biopython-1.65-test-fix-backport.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-biology/biopython/files/biopython-1.65-test-fix-backport.patch?rev=1.1&content-type=text/plain

Index: biopython-1.65-test-fix-backport.patch
===================================================================
>From 08c72f8778a87701586a03dffcce33c7589bc6d7 Mon Sep 17 00:00:00 2001
From: Peter Cock <[email protected]>
Date: Sun, 18 Jan 2015 02:07:54 +0000
Subject: [PATCH] Clearer error message; update failing test.

One of the orchid examples now returns different enough
results that the test was failing. The new error message
makes it much easier to pick another positive example to
add to the the white-list.
---
 Tests/test_NCBI_qblast.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Tests/test_NCBI_qblast.py b/Tests/test_NCBI_qblast.py
index 88bfe61..19f7b35 100644
--- a/Tests/test_NCBI_qblast.py
+++ b/Tests/test_NCBI_qblast.py
@@ -66,7 +66,7 @@ def test_orchid_est(self):
                         
AGCCATGGATTTCTCAGAAGAAAATGATTATACTTCTTAATCAGGCAACTGATATTATCAATTTATGGCA
                         
GCAGAGTGGTGGCTCCTTGTCCCAGCAGCAGTAATTACTTTTTTTTCTCTTTTTGTTTCCAAATTAAGAA
                         
ACATTAGTATCATATGGCTATTTGCTCAATTGCAGATTTCTTTCTTTTGTGAATG""",
-                        0.0000001, None, ["21554275", "18409071", "296087288"])
+                        0.0000001, None, ["21554275", "18409071", "296087288", 
"566183510"])
 
     def run_qblast(self, program, database, query, e_value, entrez_filter, 
expected_hits):
         try:
@@ -120,9 +120,10 @@ def run_qblast(self, program, database, query, e_value, 
entrez_filter, expected_
                 print("Update this test to have some redundancy...")
                 for alignment in record.alignments:
                     print(alignment.hit_id)
-            assert found_result, "Missing all of %s in alignments" \
-                % ", ".join(expected_hits)
-            self.assertTrue(found_result)
+            self.assertTrue(found_result,
+                            "Missing all expected hits (%s), instead have: %s"
+                            % (", ".join(expected_hits),
+                               ", ".join(a.hit_id for a in record.alignments)))
 
         # Check the expected result(s) are found in the descriptions
         if expected_hits is None:




Reply via email to