Commit 4575cc2c authored by Stefan Behnel's avatar Stefan Behnel

new test case for ticket #593

parent b309d5dd
...@@ -163,6 +163,7 @@ VER_DEP_MODULES = { ...@@ -163,6 +163,7 @@ VER_DEP_MODULES = {
]), ]),
(2,6) : (operator.lt, lambda x: x in ['run.print_function', (2,6) : (operator.lt, lambda x: x in ['run.print_function',
'run.cython3', 'run.cython3',
'run.property_decorator_T593', # prop.setter etc.
'run.generators_py', # generators, with statement 'run.generators_py', # generators, with statement
'run.pure_py', # decorators, with statement 'run.pure_py', # decorators, with statement
'run.purecdef', 'run.purecdef',
......
...@@ -15,7 +15,6 @@ closure_inside_cdef_T554 ...@@ -15,7 +15,6 @@ closure_inside_cdef_T554
pure_mode_cmethod_inheritance_T583 pure_mode_cmethod_inheritance_T583
genexpr_iterable_lookup_T600 genexpr_iterable_lookup_T600
for_from_pyvar_loop_T601 for_from_pyvar_loop_T601
decorators_T593
temp_sideeffects_T654 temp_sideeffects_T654
class_scope_T671 class_scope_T671
slice2_T636 slice2_T636
......
# mode: run
# ticket: 593 # ticket: 593
# tag: property, decorator
""" """
>>> am_i_buggy >>> am_i_buggy
......
# mode: run
# ticket: 593
# tag: property, decorator
class Prop(object):
"""
>>> p = Prop()
>>> p.prop
GETTING 'None'
>>> p.prop = 1
SETTING '1' (previously: 'None')
>>> p.prop
GETTING '1'
1
>>> p.prop = 2
SETTING '2' (previously: '1')
>>> p.prop
GETTING '2'
2
"""
_value = None
@property
def prop(self):
print("GETTING '%s'" % self._value)
return self._value
@prop.setter
def prop(self, value):
print("SETTING '%s' (previously: '%s')" % (value, self._value))
self._value = value
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