From cd8f7608ecb6372929863ee19c839bc0f690c2cc Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 13 Mar 2010 20:23:06 +0100 Subject: [PATCH] Py2.7 test fixes --- tests/run/dict_getitem.pyx | 6 +++--- tests/run/index.pyx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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') -- 2.26.2