from Builtin import dict_type
from StringEncoding import EncodedString
import Naming
+import Symtab
class AutoTestDictTransform(ScopeTrackingTransform):
# Handles autotestdict directive
type=py_object_type,
is_py_attr=True,
is_temp=True)
- name = "%s.%s" % (clsname, node.entry.name)
+ if isinstance(node.entry.scope, Symtab.PropertyScope):
+ new_node = AttributeNode(pos, obj=parent,
+ attribute=node.entry.scope.name,
+ type=py_object_type,
+ is_py_attr=True,
+ is_temp=True)
+ parent = new_node
+ name = "%s.%s.%s" % (clsname, node.entry.scope.name,
+ node.entry.name)
+ else:
+ name = "%s.%s" % (clsname, node.entry.name)
else:
assert False
getfunc = AttributeNode(pos, obj=parent,
class DecoratorNode(Node):
# A decorator
#
- # decorator NameNode or CallNode
+ # decorator NameNode or CallNode or AttributeNode
child_attrs = ['decorator']
property eggs:
def __get__(self):
+ """
+ This is the docstring for Spam.eggs.__get__
+ """
return 42
def tomato():
"""
>>> tomato()
42
+ >>> sorted(__test__.keys())
+ [u'Spam.eggs.__get__ (line 5)', u'tomato (line 11)']
"""
cdef Spam spam
cdef object lettuce