summaryrefslogtreecommitdiff
path: root/user/py3-more-itertools/fix-test-32bit-overflow.patch
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2018-10-28 01:24:25 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2018-10-28 01:24:25 +0000
commit5aab42b8ba925d72c8f8785dacde912b8fa07592 (patch)
tree2219284dbb953e96444378c6be63860444045c7c /user/py3-more-itertools/fix-test-32bit-overflow.patch
parent0827594f799c99a14b69d66bbef12ad8b24bc210 (diff)
parent82b7bbcbeb19ad077446cec02afa2fa879d716a4 (diff)
downloadpackages-5aab42b8ba925d72c8f8785dacde912b8fa07592.tar.gz
packages-5aab42b8ba925d72c8f8785dacde912b8fa07592.tar.bz2
packages-5aab42b8ba925d72c8f8785dacde912b8fa07592.tar.xz
packages-5aab42b8ba925d72c8f8785dacde912b8fa07592.zip
Merge branch 'itertools-32' into 'master'
user/py3-more-itertools: fix tests on 32bit See merge request !100
Diffstat (limited to 'user/py3-more-itertools/fix-test-32bit-overflow.patch')
-rw-r--r--user/py3-more-itertools/fix-test-32bit-overflow.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/user/py3-more-itertools/fix-test-32bit-overflow.patch b/user/py3-more-itertools/fix-test-32bit-overflow.patch
new file mode 100644
index 000000000..1ca1775f1
--- /dev/null
+++ b/user/py3-more-itertools/fix-test-32bit-overflow.patch
@@ -0,0 +1,25 @@
+From 27a6dd8272e4fc1b74f0e8dd3746764ae8901523 Mon Sep 17 00:00:00 2001
+From: Efraim Flashner <efraim@flashner.co.il>
+Date: Thu, 11 Oct 2018 20:36:05 +0300
+Subject: [PATCH] Fix overflow error on 32-bit hardware
+
+Addresses bug#234
+---
+ more_itertools/tests/test_more.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/more_itertools/tests/test_more.py b/more_itertools/tests/test_more.py
+index f94170b..5fbeec3 100644
+--- a/more_itertools/tests/test_more.py
++++ b/more_itertools/tests/test_more.py
+@@ -2016,8 +2016,8 @@ def test_custom_pred(self):
+ self.assertEqual(actual, expected)
+
+ def test_efficient_reversal(self):
+- iterable = range(10 ** 10) # Is efficiently reversible
+- target = 10 ** 10 - 2
++ iterable = range(9 ** 9) # Is efficiently reversible
++ target = 9 ** 9 - 2
+ pred = lambda x: x == target # Find-able from the right
+ actual = next(mi.rlocate(iterable, pred))
+ self.assertEqual(actual, target)