[med-svn] [python-pbh5tools] 02/07: Fix broken unit test
Afif Elghraoui
afif-guest at moszumanska.debian.org
Mon Feb 15 07:17:34 UTC 2016
This is an automated email from the git hooks/post-receive script.
afif-guest pushed a commit to branch master
in repository python-pbh5tools.
commit 978a04283adf0c1ebde4065611e337ff8978bb50
Author: Afif Elghraoui <afif at ghraoui.name>
Date: Sun Feb 14 21:48:39 2016 -0800
Fix broken unit test
Closes: #814210
---
debian/patches/fix-type-in-test.patch | 22 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 23 insertions(+)
diff --git a/debian/patches/fix-type-in-test.patch b/debian/patches/fix-type-in-test.patch
new file mode 100644
index 0000000..61808a9
--- /dev/null
+++ b/debian/patches/fix-type-in-test.patch
@@ -0,0 +1,22 @@
+Description: Fix setting of type in unit test
+ Passing a float as an index appears to newly break. The numbers
+ in the test can be safely cast as a float (0.1 * a three digit number),
+ so there is no need to crash and burn for this.
+ .
+ This patch is not forwarded because this package is no longer supported
+ upstream (though is still useful).
+Author: Afif Elghraoui <afif at ghraoui.name>
+Forwarded: no
+Last-Update: 2016-02-14
+
+--- python-pbh5tools.orig/tests/test_cmph5lib_CmpH5Sort.py
++++ python-pbh5tools/tests/test_cmph5lib_CmpH5Sort.py
+@@ -14,7 +14,7 @@
+ return(len(filter(lambda x : s <= x < e, vec)))
+
+ def generate_positions(size, coverage, lScale = 50):
+- NN = size*coverage
++ NN = int(size*coverage)
+ tS = random.randint(0, size, NN)
+ tE = tS + array(map(int, random.exponential(lScale, NN) + 1))
+ ar = array([tS, tE]).transpose()
diff --git a/debian/patches/series b/debian/patches/series
index 22073af..8810b93 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ pbcore-change.patch
verbose-testing.patch
override-test-failure.patch
ignore-cram-results.patch
+fix-type-in-test.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-pbh5tools.git
More information about the debian-med-commit
mailing list