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
e76e23e1
Commit
e76e23e1
authored
Feb 23, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Broke reference loops in tests added in issue #5700.
parent
7d96270d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
Lib/test/test_io.py
Lib/test/test_io.py
+3
-0
No files found.
Lib/test/test_io.py
View file @
e76e23e1
...
...
@@ -577,6 +577,7 @@ class IOTest(unittest.TestCase):
self
.
assertTrue
(
f
.
closed
)
self
.
assertTrue
(
closed
)
# flush() called
self
.
assertFalse
(
closed
[
0
])
# flush() called before file closed
f
.
flush
=
lambda
:
None
# break reference loop
def
test_flush_error_on_close
(
self
):
# raw file
...
...
@@ -786,6 +787,7 @@ class CommonBufferedTests:
self
.
assertTrue
(
closed
)
# flush() called
self
.
assertFalse
(
closed
[
0
])
# flush() called before file closed
self
.
assertFalse
(
closed
[
1
])
raw
.
flush
=
lambda
:
None
# break reference loop
def
test_close_error_on_close
(
self
):
raw
=
self
.
MockRawIO
()
...
...
@@ -2536,6 +2538,7 @@ class TextIOWrapperTest(unittest.TestCase):
self
.
assertTrue
(
closed
)
# flush() called
self
.
assertFalse
(
closed
[
0
])
# flush() called before file closed
self
.
assertFalse
(
closed
[
1
])
txt
.
flush
=
lambda
:
None
# break reference loop
def
test_multi_close
(
self
):
txt
=
self
.
TextIOWrapper
(
self
.
BytesIO
(
self
.
testdata
),
encoding
=
"ascii"
)
...
...
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