From 24f206f260fee48002bc9431abe0db89fa37ff44 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 10 Oct 2009 11:46:54 +0200 Subject: [PATCH] test fix --- tests/errors/nogil.pyx | 4 ++++ tests/run/__getattribute__.pyx | 8 ++++---- tests/run/r_docstrings.pyx | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/errors/nogil.pyx b/tests/errors/nogil.pyx index d6c3c6d0..f0c5dfa3 100644 --- a/tests/errors/nogil.pyx +++ b/tests/errors/nogil.pyx @@ -96,10 +96,14 @@ _ERRORS = u""" 28:16: Constructing complex number not allowed without gil 29:12: Accessing Python global or builtin not allowed without gil 30:8: Backquote expression not allowed without gil +30:9: Operation not allowed without gil 31:15: Assignment of Python object not allowed without gil +31:15: Operation not allowed without gil 31:15: Python import not allowed without gil +32:8: Operation not allowed without gil 32:13: Python import not allowed without gil 32:25: Constructing Python list not allowed without gil +32:25: Operation not allowed without gil 33:17: Iterating over Python object not allowed without gil 35:11: Indexing Python object not allowed without gil 36:11: Slicing Python object not allowed without gil diff --git a/tests/run/__getattribute__.pyx b/tests/run/__getattribute__.pyx index da4c1772..ea71bc2c 100644 --- a/tests/run/__getattribute__.pyx +++ b/tests/run/__getattribute__.pyx @@ -29,7 +29,7 @@ __getattribute__ and __getattr__ special methods for a single class. cdef class just_getattribute: def __getattribute__(self,n): - if n == u'bar': + if n == 'bar': return n else: raise AttributeError @@ -39,7 +39,7 @@ cdef class just_getattr: def __init__(self): self.foo = 10 def __getattr__(self,n): - if n == u'bar': + if n == 'bar': return n else: raise AttributeError @@ -49,12 +49,12 @@ cdef class both: def __init__(self): self.foo = 10 def __getattribute__(self,n): - if n == u'foo': + if n == 'foo': return self.foo else: raise AttributeError def __getattr__(self,n): - if n == u'bar': + if n == 'bar': return n else: raise AttributeError diff --git a/tests/run/r_docstrings.pyx b/tests/run/r_docstrings.pyx index 7d01f396..9d55d5c2 100644 --- a/tests/run/r_docstrings.pyx +++ b/tests/run/r_docstrings.pyx @@ -13,9 +13,9 @@ doctest = u"""# Python 3 gets all of these right ... 'This is a function docstring.' >>> C.__doc__ - u'This is a class docstring.' + 'This is a class docstring.' >>> CS.__doc__ - u'This is a subclass docstring.' + 'This is a subclass docstring.' >>> print(CSS.__doc__) None -- 2.26.2