[Git][debian-gis-team/python-mpop][master] 2 commits: Add patch by Steve Langasek to fix tests on 32-bit archs. (closes: #893335)

Bas Couwenberg gitlab at salsa.debian.org
Sun Mar 18 07:25:44 UTC 2018


Bas Couwenberg pushed to branch master at Debian GIS Project / python-mpop


Commits:
d5afcc13 by Bas Couwenberg at 2018-03-18T08:12:16+01:00
Add patch by Steve Langasek to fix tests on 32-bit archs. (closes: #893335)

- - - - -
72e33cb5 by Bas Couwenberg at 2018-03-18T08:12:44+01:00
Set distribution to unstable.

- - - - -


3 changed files:

- debian/changelog
- debian/patches/series
- + debian/patches/wordsize-safe-tests.patch


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-mpop (1.5.0-3) unstable; 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:12:18 +0100
+
 python-mpop (1.5.0-2) unstable; urgency=medium
 
   * Standard version bumped to 4.1.3 (no change)


=====================================
debian/patches/series
=====================================
--- 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


=====================================
debian/patches/wordsize-safe-tests.patch
=====================================
--- /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')



View it on GitLab: https://salsa.debian.org/debian-gis-team/python-mpop/compare/6adf1a21e8cc0c6f161e7155bbe17fdad26e77c7...72e33cb50dfa9b47682d755b5a0e428dbee3932e

---
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-mpop/compare/6adf1a21e8cc0c6f161e7155bbe17fdad26e77c7...72e33cb50dfa9b47682d755b5a0e428dbee3932e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20180318/af86debb/attachment-0001.html>


More information about the Pkg-grass-devel mailing list