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
38aca14c
Commit
38aca14c
authored
Apr 13, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests for class scope behaviour
parent
368ddfc3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
0 deletions
+43
-0
tests/bugs.txt
tests/bugs.txt
+2
-0
tests/run/class_scope.py
tests/run/class_scope.py
+14
-0
tests/run/class_scope_T671.py
tests/run/class_scope_T671.py
+12
-0
tests/run/class_scope_del_T684.py
tests/run/class_scope_del_T684.py
+15
-0
No files found.
tests/bugs.txt
View file @
38aca14c
...
...
@@ -18,6 +18,8 @@ genexpr_iterable_lookup_T600
for_from_pyvar_loop_T601
decorators_T593
temp_sideeffects_T654
class_scope_T671
class_scope_del_T684
# CPython regression tests that don't current work:
pyregr.test_threadsignals
...
...
tests/run/class_scope.py
0 → 100644
View file @
38aca14c
# mode:run
# tag: class, scope
class
MethodRedef
(
object
):
"""
>>> MethodRedef().a(5)
7
"""
def
a
(
self
,
i
):
return
i
+
1
def
a
(
self
,
i
):
return
i
+
2
tests/run/class_scope_T671.py
0 → 100644
View file @
38aca14c
# mode:run
# tag: class, scope
# ticket: 671
MAIN
=
True
class
OuterScopeLookup
(
object
):
"""
>>> OuterScopeLookup.MAIN
True
"""
MAIN
=
MAIN
# looked up in parent scope, assigned to class scope
tests/run/class_scope_del_T684.py
0 → 100644
View file @
38aca14c
# mode:run
# tag: class, scope, del
# ticket: 684
class
DelInClass
(
object
):
"""
>>> DelInClass.y
5
>>> DelInClass.x
Traceback (most recent call last):
AttributeError: type object 'DelInClass' has no attribute 'x'
"""
x
=
5
y
=
x
del
x
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