[med-svn] r19215 - in trunk/packages/python-biopython/trunk/debian: . patches
Andreas Tille
tille at moszumanska.debian.org
Mon May 11 18:54:12 UTC 2015
Author: tille
Date: 2015-05-11 18:54:12 +0000 (Mon, 11 May 2015)
New Revision: 19215
Added:
trunk/packages/python-biopython/trunk/debian/patches/fix_broken_test.patch
Modified:
trunk/packages/python-biopython/trunk/debian/changelog
trunk/packages/python-biopython/trunk/debian/patches/series
Log:
Apply fix for broken test from Upstream Git
Modified: trunk/packages/python-biopython/trunk/debian/changelog
===================================================================
--- trunk/packages/python-biopython/trunk/debian/changelog 2015-05-11 15:14:35 UTC (rev 19214)
+++ trunk/packages/python-biopython/trunk/debian/changelog 2015-05-11 18:54:12 UTC (rev 19215)
@@ -1,6 +1,7 @@
python-biopython (1.65+dfsg-1) UNRELEASED; urgency=medium
* New upstream version
+ * Apply fix for broken test from Upstream Git
-- Andreas Tille <tille at debian.org> Sat, 09 May 2015 07:13:03 +0200
Added: trunk/packages/python-biopython/trunk/debian/patches/fix_broken_test.patch
===================================================================
--- trunk/packages/python-biopython/trunk/debian/patches/fix_broken_test.patch (rev 0)
+++ trunk/packages/python-biopython/trunk/debian/patches/fix_broken_test.patch 2015-05-11 18:54:12 UTC (rev 19215)
@@ -0,0 +1,53 @@
+Author: Peter Cock <notifications at github.com>
+Last-Update: Mon, 11 May 2015 07:38:41 -0700
+Description: Corner case for absolute vs relative paths (issue #541)
+ https://github.com/biopython/biopython/commit/cf54c6c5a99be1127fdbd839ea01067ffc21f302?diff=unified
+
+--- a/Tests/test_SeqIO_index.py
++++ b/Tests/test_SeqIO_index.py
+@@ -257,16 +257,34 @@ if sqlite3:
+ expt_sff_files)
+
+ def test_some_abs(self):
+- """Check absolute filenames in index."""
++ """Check absolute filenames in index.
++
++ Unless the repository and tests themselves are under the temp
++ directory (as detected by ``tempfile``), we expect the index to
++ use absolute filenames.
++ """
+ h, t = tempfile.mkstemp(prefix="index_test_", suffix=".idx")
+ os.close(h)
+ os.remove(t)
+
+- expt_sff_files = [os.path.abspath("Roche/E3MFGYR02_no_manifest.sff"),
+- os.path.abspath("Roche/greek.sff"),
+- os.path.abspath(os.path.join("Roche", "paired.sff"))]
+- # All absolute paths...
+- self.check(t, expt_sff_files, expt_sff_files)
++ abs_sff_files = [os.path.abspath("Roche/E3MFGYR02_no_manifest.sff"),
++ os.path.abspath("Roche/greek.sff"),
++ os.path.abspath(os.path.join("Roche", "paired.sff"))]
++
++ if os.getcwd().startswith(os.path.dirname(t)):
++ # The tests are being run from within the temp directory,
++ # e.g. index filename /tmp/index_test_XYZ.idx
++ # and working directory of /tmp/biopython/Tests/
++ # This means the indexing will use a RELATIVE path
++ # e.g. biopython/Tests/Roche/E3MFGYR02_no_manifest.sff
++ # not /tmp/biopython/Tests/Roche/E3MFGYR02_no_manifest.sff
++ expt_sff_files = [os.path.relpath(f, os.path.dirname(t))
++ for f in abs_sff_files]
++ else:
++ expt_sff_files = abs_sff_files
++
++ # Providing absolute paths...
++ self.check(t, abs_sff_files, expt_sff_files)
+ # Now try with mix of abs and relative paths...
+ self.check(t,
+ [os.path.abspath("Roche/E3MFGYR02_no_manifest.sff"),
+@@ -646,3 +664,4 @@ for filename, format, alphabet in tests:
+ if __name__ == "__main__":
+ runner = unittest.TextTestRunner(verbosity=2)
+ unittest.main(testRunner=runner)
++
Modified: trunk/packages/python-biopython/trunk/debian/patches/series
===================================================================
--- trunk/packages/python-biopython/trunk/debian/patches/series 2015-05-11 15:14:35 UTC (rev 19214)
+++ trunk/packages/python-biopython/trunk/debian/patches/series 2015-05-11 18:54:12 UTC (rev 19215)
@@ -1 +1,2 @@
remove_mathml-qname.patch
+fix_broken_test.patch
More information about the debian-med-commit
mailing list