Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
4c089036
Commit
4c089036
authored
Mar 14, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make this test a bit harder
parent
92c78799
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
test/tests/descr_selfdelete.py
test/tests/descr_selfdelete.py
+26
-0
No files found.
test/tests/descr_selfdelete.py
View file @
4c089036
import
sys
class
C
(
object
):
def
__delattr__
(
self
,
attr
):
print
"__delattr__"
del
C
.
__delattr__
sys
.
_clear_type_cache
()
c
=
C
()
del
c
.
a
try
:
...
...
@@ -13,6 +16,7 @@ class C(object):
def
__getattr__
(
self
,
attr
):
print
"__getattr__"
del
C
.
__getattr__
sys
.
_clear_type_cache
()
return
attr
c
=
C
()
print
c
.
a
...
...
@@ -25,9 +29,31 @@ class C(object):
def
__setattr__
(
self
,
attr
,
val
):
print
"__setattr__"
,
attr
,
val
del
C
.
__setattr__
sys
.
_clear_type_cache
()
c
=
C
()
c
.
a
=
1
try
:
c
.
a
=
2
except
Exception
as
e
:
print
e
class
D
(
object
):
def
__get__
(
self
,
obj
,
type
):
print
"D.__get__"
del
D
.
__get__
sys
.
_clear_type_cache
()
return
1
def
__set__
(
self
,
obj
,
value
):
print
"D.__set__"
del
D
.
__set__
sys
.
_clear_type_cache
()
C
.
x
=
D
()
c
=
C
()
c
.
x
=
0
print
c
.
x
c
.
x
=
0
print
c
.
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