Skip to content
Commits on Source (2)
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@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)
......
......@@ -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
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@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')