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
7f8ede4d
Commit
7f8ede4d
authored
Jun 22, 2010
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mark ref counting as impl detail
parent
694781b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
Lib/test/test_iter.py
Lib/test/test_iter.py
+3
-4
No files found.
Lib/test/test_iter.py
View file @
7f8ede4d
...
...
@@ -2,7 +2,7 @@
import
unittest
from
test.test_support
import
run_unittest
,
TESTFN
,
unlink
,
have_unicode
,
\
check_py3k_warnings
,
gc_collect
check_py3k_warnings
,
cpython_only
# Test result of triple loop (too big to inline)
TRIPLETS
=
[(
0
,
0
,
0
),
(
0
,
0
,
1
),
(
0
,
0
,
2
),
...
...
@@ -793,8 +793,9 @@ class TestCase(unittest.TestCase):
(
a
,
b
),
(
c
,)
=
IteratingSequenceClass
(
2
),
{
42
:
24
}
self
.
assertEqual
((
a
,
b
,
c
),
(
0
,
1
,
42
))
# Test reference count behavior
@
cpython_only
def
test_ref_counting_behavior
(
self
):
class
C
(
object
):
count
=
0
def
__new__
(
cls
):
...
...
@@ -807,7 +808,6 @@ class TestCase(unittest.TestCase):
x
=
C
()
self
.
assertEqual
(
C
.
count
,
1
)
del
x
gc_collect
()
self
.
assertEqual
(
C
.
count
,
0
)
l
=
[
C
(),
C
(),
C
()]
self
.
assertEqual
(
C
.
count
,
3
)
...
...
@@ -816,7 +816,6 @@ class TestCase(unittest.TestCase):
except
ValueError
:
pass
del
l
gc_collect
()
self
.
assertEqual
(
C
.
count
,
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