Commit 77ec0cc4 authored by Dag Sverre Seljebotn's avatar Dag Sverre Seljebotn

Yet another bugfix for autotestdict

parent c7469874
......@@ -64,7 +64,11 @@ class AutoTestDictTransform(ScopeTrackingTransform):
parent = ModuleRefNode(pos)
name = node.entry.name
elif self.scope_type in ('pyclass', 'cclass'):
if self.scope_type == 'cclass' and node.name in self.blacklist:
if isinstance(node, CFuncDefNode):
name = node.py_func.name
else:
name = node.name
if self.scope_type == 'cclass' and name in self.blacklist:
return node
mod = ModuleRefNode(pos)
if self.scope_type == 'pyclass':
......
......@@ -12,6 +12,7 @@ all_tests_run() is executed which does final validation.
>>> items.sort()
>>> for key, value in items:
... print('%s ; %s' % (key, value))
MyCdefClass.cpdef_method (line 78) ; >>> add_log("cpdef class method")
MyCdefClass.method (line 75) ; >>> add_log("cdef class method")
MyClass.method (line 65) ; >>> add_log("class method")
doc_without_test (line 47) ; Some docs
......@@ -22,7 +23,6 @@ myfunc (line 44) ; >>> add_log("def")
log = []
cdef cdeffunc():
"""
Please don't include me!
......@@ -75,6 +75,9 @@ cdef class MyCdefClass:
def method(self):
""">>> add_log("cdef class method")"""
cpdef cpdef_method(self):
""">>> add_log("cpdef class method")"""
def __cinit__(self):
"""
Should not be included, as it can't be looked up with getattr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment