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
edf14317
Commit
edf14317
authored
Dec 23, 2008
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport of r67908:
Added test case to ensure attempts to read from a file opened for writing fail.
parent
b90b144c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
Lib/test/test_file.py
Lib/test/test_file.py
+2
-0
Misc/NEWS
Misc/NEWS
+6
-0
No files found.
Lib/test/test_file.py
View file @
edf14317
...
@@ -116,6 +116,8 @@ class AutoFileTests(unittest.TestCase):
...
@@ -116,6 +116,8 @@ class AutoFileTests(unittest.TestCase):
except
:
except
:
self
.
assertEquals
(
self
.
f
.
__exit__
(
*
sys
.
exc_info
()),
None
)
self
.
assertEquals
(
self
.
f
.
__exit__
(
*
sys
.
exc_info
()),
None
)
def
testReadWhenWriting
(
self
):
self
.
assertRaises
(
IOError
,
self
.
f
.
read
)
class
OtherFileTests
(
unittest
.
TestCase
):
class
OtherFileTests
(
unittest
.
TestCase
):
...
...
Misc/NEWS
View file @
edf14317
...
@@ -9,6 +9,12 @@ What's New in Python 2.5.4?
...
@@ -9,6 +9,12 @@ What's New in Python 2.5.4?
*Release date: XX-XXX-2009*
*Release date: XX-XXX-2009*
Core and builtins
-----------------
- Added test case to ensure attempts to read from a file opened for writing
fail.
What'
s
New
in
Python
2.5.3
?
What'
s
New
in
Python
2.5.3
?
===========================
===========================
...
...
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