From: Stefan Behnel Date: Sat, 13 Mar 2010 19:23:06 +0000 (+0100) Subject: Py2.7 test fixes X-Git-Tag: 0.13.beta0~300 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cd8f7608ecb6372929863ee19c839bc0f690c2cc;p=cython.git Py2.7 test fixes --- diff --git a/tests/run/dict_getitem.pyx b/tests/run/dict_getitem.pyx index b465a5b8..b4673d6c 100644 --- a/tests/run/dict_getitem.pyx +++ b/tests/run/dict_getitem.pyx @@ -22,13 +22,13 @@ def test(dict d, index): ... ValueError - >>> test(None, 1) + >>> test(None, 1) # doctest: +ELLIPSIS Traceback (most recent call last): ... - TypeError: 'NoneType' object is unsubscriptable + TypeError: 'NoneType' object is ... """ return d[index] cdef class Subscriptable: def __getitem__(self, key): - return key \ No newline at end of file + return key diff --git a/tests/run/index.pyx b/tests/run/index.pyx index 1b6fd68e..57046677 100644 --- a/tests/run/index.pyx +++ b/tests/run/index.pyx @@ -6,7 +6,7 @@ __doc__ = u""" """ import sys -if sys.version_info[0] >= 3: +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')