summaryrefslogtreecommitdiff
path: root/user/py3-more-itertools/fix-test-32bit-overflow.patch
blob: 1ca1775f1a6b23b4fcf2babbfacf4377aae95960 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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)