Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xavier Thompson
cython
Commits
4575cc2c
Commit
4575cc2c
authored
Aug 13, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new test case for ticket #593
parent
b309d5dd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
1 deletion
+34
-1
runtests.py
runtests.py
+1
-0
tests/bugs.txt
tests/bugs.txt
+0
-1
tests/run/decorators_T593.pyx
tests/run/decorators_T593.pyx
+2
-0
tests/run/property_decorator_T593.py
tests/run/property_decorator_T593.py
+31
-0
No files found.
runtests.py
View file @
4575cc2c
...
...
@@ -163,6 +163,7 @@ VER_DEP_MODULES = {
]),
(2,6) : (operator.lt, lambda x: x in ['run.print_function',
'run.cython3',
'run.property_decorator_T593', # prop.setter etc.
'run.generators_py', # generators, with statement
'run.pure_py', # decorators, with statement
'run.purecdef',
...
...
tests/bugs.txt
View file @
4575cc2c
...
...
@@ -15,7 +15,6 @@ closure_inside_cdef_T554
pure_mode_cmethod_inheritance_T583
genexpr_iterable_lookup_T600
for_from_pyvar_loop_T601
decorators_T593
temp_sideeffects_T654
class_scope_T671
slice2_T636
...
...
tests/run/decorators_T593.pyx
View file @
4575cc2c
# mode: run
# ticket: 593
# tag: property, decorator
"""
>>> am_i_buggy
...
...
tests/run/property_decorator_T593.py
0 → 100644
View file @
4575cc2c
# 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment