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
b7a3e2dc
Commit
b7a3e2dc
authored
Feb 07, 2015
by
Travis Hance
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ics test for getset getting and setting
parent
f854cf2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
test/tests/classname.py
test/tests/classname.py
+1
-1
test/tests/descriptors_getset_ics.py
test/tests/descriptors_getset_ics.py
+19
-0
No files found.
test/tests/classname.py
View file @
b7a3e2dc
...
...
@@ -23,7 +23,7 @@ def del_name(cls):
del
cls
.
__name__
except
Exception
as
e
:
print
type
(
e
),
e
print
cls
print
cls
.
__name__
set_name
(
int
,
"bob"
)
#TODO implement __del__ for getset descriptors
...
...
test/tests/descriptors_getset_ics.py
0 → 100644
View file @
b7a3e2dc
# run_args: -n
# statcheck: stats['slowpath_getattr'] <= 10
# statcheck: stats['slowpath_setattr'] <= 10
class
C
(
object
):
pass
def
f
(
obj
,
name
):
obj
.
__name__
=
name
print
obj
.
__name__
# pass in a class each time
for
i
in
xrange
(
1000
):
f
(
C
,
str
(
i
))
# TODO test guards failing
# I think we need to get a getset descriptor that isn't __name__
# or implement __dict__ to write such a test: otherwise it's impossible
# to actually get our hands on the descriptor object :\
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