[python-mpop] 01/02: Add patch by Steve Langasek to fix tests on 32-bit archs. (closes: #893335)

Bas Couwenberg sebastic at debian.org
Sun Mar 18 07:25:34 UTC 2018


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository python-mpop.

commit d5afcc1301d3e740a6b7c05cbc5b15b3d5f1f359
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Mar 18 08:12:16 2018 +0100

    Add patch by Steve Langasek to fix tests on 32-bit archs. (closes: #893335)
---
 debian/changelog                         |  8 ++++++++
 debian/patches/series                    |  1 +
 debian/patches/wordsize-safe-tests.patch | 26 ++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 7bd8049..c3a3316 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-mpop (1.5.0-3) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Add patch by Steve Langasek to fix tests on 32-bit archs.
+    (closes: #893335)
+
+ -- Bas Couwenberg <sebastic at debian.org>  Sun, 18 Mar 2018 08:11:20 +0100
+
 python-mpop (1.5.0-2) unstable; urgency=medium
 
   * Standard version bumped to 4.1.3 (no change)
diff --git a/debian/patches/series b/debian/patches/series
index 5148ea4..f304063 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0003-fix-missing-trollsift.patch
 0004-Include-test-sub-package.patch
 0005-Disable-TestEmptyImage.test_pil_image.patch
+wordsize-safe-tests.patch
diff --git a/debian/patches/wordsize-safe-tests.patch b/debian/patches/wordsize-safe-tests.patch
new file mode 100644
index 0000000..ab97420
--- /dev/null
+++ b/debian/patches/wordsize-safe-tests.patch
@@ -0,0 +1,26 @@
+Description: fix tests to work on 32-bit archs
+ The python hash() function doesn't return the same results on 64-bit and
+ 32-bit archs, so don't make incorrect assumptions about its output in a
+ test when used for something as inconsequential as predictable cache file
+ names.
+Author: Steve Langasek <steve.langasek at ubuntu.com>
+Bug-Debian: https://bugs.debian.org/893335
+
+--- a/mpop/tests/test_projector.py
++++ b/mpop/tests/test_projector.py
+@@ -259,8 +259,13 @@ class TestProjector(unittest.TestCase):
+         res = mpop.projector.get_precompute_cache_fname('in_id', 'out_id',
+                                                         'in_area', 'out_area',
+                                                         'mode', 'proj_dir')
+-        cor_res = "proj_dir/in_id2out_id_-" + \
+-                  "6296787761359943868to8984161303220364208_mode.npz"
++        if sys.maxsize > 2**32:
++            cor_res = "proj_dir/in_id2out_id_-" + \
++                      "6296787761359943868to8984161303220364208_mode.npz"
++        else:
++            cor_res = "proj_dir/in_id2out_id_-" + \
++                      "1843591356to-347954256_mode.npz"
++
+         self.assertTrue(res == cor_res)
+ 
+     @patch.object(mpop.projector, 'get_area_def')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/python-mpop.git



More information about the Pkg-grass-devel mailing list