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): ...@@ -64,7 +64,11 @@ class AutoTestDictTransform(ScopeTrackingTransform):
parent = ModuleRefNode(pos) parent = ModuleRefNode(pos)
name = node.entry.name name = node.entry.name
elif self.scope_type in ('pyclass', 'cclass'): 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 return node
mod = ModuleRefNode(pos) mod = ModuleRefNode(pos)
if self.scope_type == 'pyclass': if self.scope_type == 'pyclass':
......
...@@ -12,6 +12,7 @@ all_tests_run() is executed which does final validation. ...@@ -12,6 +12,7 @@ all_tests_run() is executed which does final validation.
>>> items.sort() >>> items.sort()
>>> for key, value in items: >>> for key, value in items:
... print('%s ; %s' % (key, value)) ... print('%s ; %s' % (key, value))
MyCdefClass.cpdef_method (line 78) ; >>> add_log("cpdef class method")
MyCdefClass.method (line 75) ; >>> add_log("cdef class method") MyCdefClass.method (line 75) ; >>> add_log("cdef class method")
MyClass.method (line 65) ; >>> add_log("class method") MyClass.method (line 65) ; >>> add_log("class method")
doc_without_test (line 47) ; Some docs doc_without_test (line 47) ; Some docs
...@@ -22,7 +23,6 @@ myfunc (line 44) ; >>> add_log("def") ...@@ -22,7 +23,6 @@ myfunc (line 44) ; >>> add_log("def")
log = [] log = []
cdef cdeffunc(): cdef cdeffunc():
""" """
Please don't include me! Please don't include me!
...@@ -75,6 +75,9 @@ cdef class MyCdefClass: ...@@ -75,6 +75,9 @@ cdef class MyCdefClass:
def method(self): def method(self):
""">>> add_log("cdef class method")""" """>>> add_log("cdef class method")"""
cpdef cpdef_method(self):
""">>> add_log("cpdef class method")"""
def __cinit__(self): def __cinit__(self):
""" """
Should not be included, as it can't be looked up with getattr 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