Blacklist __nonzero__ from autotestdict
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Tue, 20 Oct 2009 08:37:13 +0000 (10:37 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Tue, 20 Oct 2009 08:37:13 +0000 (10:37 +0200)
Cython/Compiler/AnalysedTreeTransforms.py
tests/run/autotestdict.pyx

index 933250c6699596c64a8918cb330a2d6509510ff1..300aebbc9b3bd3d8c79073d02329abc37decde64 100644 (file)
@@ -10,7 +10,7 @@ import Naming
 class AutoTestDictTransform(ScopeTrackingTransform):
     # Handles autotestdict directive
 
-    blacklist = ['__cinit__', '__dealloc__', '__richcmp__']
+    blacklist = ['__cinit__', '__dealloc__', '__richcmp__', '__nonzero__']
 
     def visit_ModuleNode(self, node):
         self.scope_type = 'module'
index bc1f7fc0dd7412b71620eecd3da418483f6fa5e9..e4f47a44c5fe2f4749d8365b107a4e5b4d93b21f 100644 (file)
@@ -102,5 +102,12 @@ cdef class MyCdefClass:
         False
         """
 
+    def __nonzero__(self):
+        """
+        Should not be included, as it can't be looked up with getattr in Py 3.1
+
+        >>> True
+        False
+        """