Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Kirill Smelkov
cpython
Commits
98a379ed
Commit
98a379ed
authored
Jun 16, 2003
by
Neal Norwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for bug #751998.
parent
b47243ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
Lib/test/test_descr.py
Lib/test/test_descr.py
+16
-0
No files found.
Lib/test/test_descr.py
View file @
98a379ed
...
...
@@ -1267,6 +1267,22 @@ def slots():
g
==
g
new_objects
=
len
(
gc
.
get_objects
())
vereq
(
orig_objects
,
new_objects
)
class
H
(
object
):
__slots__
=
[
'a'
,
'b'
]
def
__init__
(
self
):
self
.
a
=
1
self
.
b
=
2
def
__del__
(
self
):
assert
self
.
a
==
1
assert
self
.
b
==
2
save_stderr
=
sys
.
stderr
sys
.
stderr
=
sys
.
stdout
h
=
H
()
try
:
del
h
finally
:
sys
.
stderr
=
save_stderr
def
slotspecials
():
if
verbose
:
print
"Testing __dict__ and __weakref__ in __slots__..."
...
...
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