[med-svn] r3041 - in trunk/packages/python-biopython/trunk/debian: . patches
plessy at alioth.debian.org
plessy at alioth.debian.org
Fri Jan 23 12:46:32 UTC 2009
Author: plessy
Date: 2009-01-23 12:46:31 +0000 (Fri, 23 Jan 2009)
New Revision: 3041
Added:
trunk/packages/python-biopython/trunk/debian/patches/02-fix-wise-test.patch
Modified:
trunk/packages/python-biopython/trunk/debian/changelog
trunk/packages/python-biopython/trunk/debian/patches/series
Log:
Added a patch that prevents the tests from failing with Debian's version of Wise.
Modified: trunk/packages/python-biopython/trunk/debian/changelog
===================================================================
--- trunk/packages/python-biopython/trunk/debian/changelog 2009-01-23 07:30:47 UTC (rev 3040)
+++ trunk/packages/python-biopython/trunk/debian/changelog 2009-01-23 12:46:31 UTC (rev 3041)
@@ -24,6 +24,8 @@
- debian/control: build-depends on quilt.
* debian/python-biopython-doc.doc-base: corrected index name that was changed
upstream.
+ * debian/patches/02-fix-wise-test.patch: prevents tests failing with Debian's
+ version of Wise.
* debian/rules: perform tests after build.
-- Charles Plessy <plessy at debian.org> Thu, 15 Jan 2009 13:15:44 +0900
Added: trunk/packages/python-biopython/trunk/debian/patches/02-fix-wise-test.patch
===================================================================
--- trunk/packages/python-biopython/trunk/debian/patches/02-fix-wise-test.patch (rev 0)
+++ trunk/packages/python-biopython/trunk/debian/patches/02-fix-wise-test.patch 2009-01-23 12:46:31 UTC (rev 3041)
@@ -0,0 +1,61 @@
+Author: Peter <biopython-bugzilla at maubp.freeserve.co.uk>
+Description: Wise output changed between 2.2.0 and 2.4.1.
+ This patch makes the test pass for both versions.
+Forwarded: no
+ This patch is an Upstream patch:
+ http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Tests/test_Wise.py.diff?r2=1.7&cvsroot=biopython&r1=1.6&diff_format=u
+License: same as Biopython.
+
+===================================================================
+RCS file: /home/repository/biopython/biopython/Tests/test_Wise.py,v
+retrieving revision 1.6
+retrieving revision 1.7
+diff -u -r1.6 -r1.7
+--- biopython/Tests/test_Wise.py 2008/11/07 11:51:18 1.6
++++ biopython/Tests/test_Wise.py 2009/01/23 12:23:20 1.7
+@@ -3,7 +3,7 @@
+ # license. Please see the LICENSE file that should have been included
+ # as part of this package.
+
+-__version__ = "$Revision: 1.6 $"
++__version__ = "$Revision: 1.7 $"
+
+ import cStringIO
+ import doctest, unittest
+@@ -29,10 +29,12 @@
+ sys.stdout = cStringIO.StringIO()
+
+ def test_dnal(self):
++ """Call dnal, and do a trivial check on its output."""
+ Wise.align(["dnal"], ("seq1.fna", "seq2.fna"), kbyte=100000, dry_run=True)
+ self.assert_(sys.stdout.getvalue().startswith("dnal -kbyte 100000 seq1.fna seq2.fna"))
+
+ def test_psw(self):
++ """Call psw, and do a trivial check on its output."""
+ Wise.align(["psw"], ("seq1.faa", "seq2.faa"), dry_run=True, kbyte=4)
+ self.assert_(sys.stdout.getvalue().startswith("psw -kbyte 4 seq1.faa seq2.faa"))
+
+@@ -41,8 +43,21 @@
+
+ class TestWise(unittest.TestCase):
+ def test_align(self):
++ """Call dnal with optional arguments, and do a trivial check on the output."""
+ temp_file = Wise.align(["dnal"], ("Wise/human_114_g01_exons.fna_01", "Wise/human_114_g02_exons.fna_01"), kbyte=100000, force_type="DNA", quiet=True)
+- self.assertEqual(temp_file.readline().rstrip(), "ENSG00000172135 AGGGAAAGCCCCTAAGCTC--CTGATCTATGCTGCATCCAGTTTGCAAAGTGGGGTCCC")
++ line = temp_file.readline().rstrip()
++ if line == "Score 114" :
++ #Wise 2.4.1 includes a score line, even in quiet mode, ignore this
++ line = temp_file.readline().rstrip()
++ if line == "ENSG00000172135 AGGGAAAGCCCCTAAGCTC--CTGATCTATGCTGCATCCAGTTTGCAAAGTGGGGTCCC" :
++ #This is what we expect from wise 2.2.0 (and earlier)
++ pass
++ elif line == "ENSG00000172135 AGGGAAAGCCCCTAAGCTC--CTGATCTATGCTGCATCCAGTTTGCAAAG-TGGGGTCC" :
++ #This is what we expect from wise 2.4.1
++ pass
++ else :
++ #Bad!
++ self.assert_(False, line)
+
+ def run_tests(argv):
+ test_suite = testing_suite()
+
Modified: trunk/packages/python-biopython/trunk/debian/patches/series
===================================================================
--- trunk/packages/python-biopython/trunk/debian/patches/series 2009-01-23 07:30:47 UTC (rev 3040)
+++ trunk/packages/python-biopython/trunk/debian/patches/series 2009-01-23 12:46:31 UTC (rev 3041)
@@ -1 +1,2 @@
01-enable-mmCIF.patch
+02-fix-wise-test.patch
More information about the debian-med-commit
mailing list