File: 0001-Fix-i386-test-failure.patch

package info (click to toggle)
python-concurrent.futures 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 284 kB
  • ctags: 352
  • sloc: python: 1,409; makefile: 89
file content (42 lines) | stat: -rw-r--r-- 1,967 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: Barry Warsaw <barry@debian.org>
Date: Thu, 18 Sep 2014 16:42:16 -0400
Subject: Fix i386 test failure.
Bug: https://code.google.com/p/pythonfutures/issues/detail?id=27
Forwarded: yes

On 32 bit, the reprs have a trailing L.  Not accounting for this causes a
FTBFS due to test failure.
---
 test_futures.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/test_futures.py b/test_futures.py
index dd7fd3e..40ae279 100644
--- a/test_futures.py
+++ b/test_futures.py
@@ -574,19 +574,19 @@ class FutureTests(unittest.TestCase):
 
     def test_repr(self):
         self.assertRegexpMatches(repr(PENDING_FUTURE),
-                                 '<Future at 0x[0-9a-f]+ state=pending>')
+                                 '<Future at 0x[0-9a-f]+L? state=pending>')
         self.assertRegexpMatches(repr(RUNNING_FUTURE),
-                                 '<Future at 0x[0-9a-f]+ state=running>')
+                                 '<Future at 0x[0-9a-f]+L? state=running>')
         self.assertRegexpMatches(repr(CANCELLED_FUTURE),
-                                 '<Future at 0x[0-9a-f]+ state=cancelled>')
+                                 '<Future at 0x[0-9a-f]+L? state=cancelled>')
         self.assertRegexpMatches(repr(CANCELLED_AND_NOTIFIED_FUTURE),
-                                 '<Future at 0x[0-9a-f]+ state=cancelled>')
+                                 '<Future at 0x[0-9a-f]+L? state=cancelled>')
         self.assertRegexpMatches(
                 repr(EXCEPTION_FUTURE),
-                '<Future at 0x[0-9a-f]+ state=finished raised IOError>')
+                '<Future at 0x[0-9a-f]+L? state=finished raised IOError>')
         self.assertRegexpMatches(
                 repr(SUCCESSFUL_FUTURE),
-                '<Future at 0x[0-9a-f]+ state=finished returned int>')
+                '<Future at 0x[0-9a-f]+L? state=finished returned int>')
 
     def test_cancel(self):
         f1 = create_future(state=PENDING)