Package: cython / 0.15.1-2

python27-testsuite-fix.patch Patch series | 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
43
Description: Upstream fix (post 0.15.1 release) to work around changes
 in Python 2.7's indexing error message.
Origin: https://github.com/cython/cython/commit/b623fb856a82d2ece1e2f04fb32309384ab0cb7e.diff
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/cython/+bug/901840/+index
Forwarded: not-needed

diff --git a/tests/run/dict_getitem.pyx b/tests/run/dict_getitem.pyx
index 845ac7f..40e05e8 100644
--- a/tests/run/dict_getitem.pyx
+++ b/tests/run/dict_getitem.pyx
@@ -21,7 +21,7 @@ def test(dict d, index):
 
     >>> test(None, 1) # doctest: +ELLIPSIS
     Traceback (most recent call last):
-    TypeError: ...subscriptable...
+    TypeError: ...object...
     """
     return d[index]
 
diff --git a/tests/run/index.pyx b/tests/run/index.pyx
index 22cec2b..74eec6e 100644
--- a/tests/run/index.pyx
+++ b/tests/run/index.pyx
@@ -1,15 +1,13 @@
 __doc__ = u"""
-    >>> index_object(100, 100)
+    >>> index_object(100, 100)       # doctest: +ELLIPSIS
     Traceback (most recent call last):
     ...
-    TypeError: 'int' object is unsubscriptable
+    TypeError: 'int' object ...
 """
 
 import sys
-if sys.version_info >= (2,7):
-    __doc__ = __doc__.replace(u'is unsubscriptable', u'is not subscriptable')
-elif sys.version_info < (2,5):
-    __doc__ = __doc__.replace(u"'int' object is unsubscriptable", u'unsubscriptable object')
+if sys.version_info < (2,5):
+    __doc__ = __doc__.replace(u"'int' object ...", u'unsubscriptable object')
 
 import cython