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
Gwenaël Samain
cython
Commits
ac511d83
Commit
ac511d83
authored
Nov 13, 2010
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add testcase for ticket #593
parent
a68962a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
tests/bugs.txt
tests/bugs.txt
+1
-0
tests/run/decorators_T593.pyx
tests/run/decorators_T593.pyx
+48
-0
No files found.
tests/bugs.txt
View file @
ac511d83
...
...
@@ -18,6 +18,7 @@ ipow_crash_T562
pure_mode_cmethod_inheritance_T583
genexpr_iterable_lookup_T600
for_from_pyvar_loop_T601
decorators_T593
# CPython regression tests that don't current work:
pyregr.test_threadsignals
...
...
tests/run/decorators_T593.pyx
0 → 100644
View file @
ac511d83
"""
>>> am_i_buggy
False
>>> Foo
False
"""
def
testme
(
func
):
try
:
am_i_buggy
return
True
except
NameError
:
return
False
@
testme
def
am_i_buggy
():
pass
def
testclass
(
klass
):
try
:
Foo
return
True
except
NameError
:
return
False
@
testclass
class
Foo
:
pass
class
ODict
(
dict
):
def
__init__
(
self
):
dict
.
__init__
(
self
)
self
.
_order
=
[]
dict
.
__setitem__
(
self
,
'_order'
,
self
.
_order
)
def
__setitem__
(
self
,
key
,
value
):
dict
.
__setitem__
(
self
,
key
,
value
)
self
.
_order
.
append
(
key
)
class
Base
(
type
):
@
staticmethod
def
__prepare__
(
*
args
,
**
kwargs
):
return
ODict
()
class
Bar
(
metaclass
=
Base
):
"""
>>> Bar._order
['__module__', '__doc__', 'bar']
"""
@
property
def
bar
(
self
):
return
0
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