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
bdce938a
Commit
bdce938a
authored
Dec 20, 2013
by
Zachary Ware
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test.outstanding_bugs.py
parent
715233c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
72 deletions
+2
-72
Lib/test/outstanding_bugs.py
Lib/test/outstanding_bugs.py
+2
-72
No files found.
Lib/test/outstanding_bugs.py
View file @
bdce938a
...
...
@@ -10,79 +10,9 @@ import unittest
from
test
import
support
#
#
One test case for outstanding bugs at the moment:
#
No test cases for outstanding bugs at the moment.
#
# test_io
import
io
class
TextIOWrapperTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
testdata
=
b"AAA
\
r
\
n
BBB
\
r
CCC
\
r
\
n
DDD
\
n
EEE
\
r
\
n
"
self
.
normalized
=
b"AAA
\
n
BBB
\
n
CCC
\
n
DDD
\
n
EEE
\
n
"
.
decode
(
"ASCII"
)
def
tearDown
(
self
):
support
.
unlink
(
support
.
TESTFN
)
def
test_issue1395_1
(
self
):
txt
=
io
.
TextIOWrapper
(
io
.
BytesIO
(
self
.
testdata
),
encoding
=
"ASCII"
)
# read one char at a time
reads
=
""
while
True
:
c
=
txt
.
read
(
1
)
if
not
c
:
break
reads
+=
c
self
.
assertEqual
(
reads
,
self
.
normalized
)
def
test_issue1395_2
(
self
):
txt
=
io
.
TextIOWrapper
(
io
.
BytesIO
(
self
.
testdata
),
encoding
=
"ASCII"
)
txt
.
_CHUNK_SIZE
=
4
reads
=
""
while
True
:
c
=
txt
.
read
(
4
)
if
not
c
:
break
reads
+=
c
self
.
assertEqual
(
reads
,
self
.
normalized
)
def
test_issue1395_3
(
self
):
txt
=
io
.
TextIOWrapper
(
io
.
BytesIO
(
self
.
testdata
),
encoding
=
"ASCII"
)
txt
.
_CHUNK_SIZE
=
4
reads
=
txt
.
read
(
4
)
reads
+=
txt
.
read
(
4
)
reads
+=
txt
.
readline
()
reads
+=
txt
.
readline
()
reads
+=
txt
.
readline
()
self
.
assertEqual
(
reads
,
self
.
normalized
)
def
test_issue1395_4
(
self
):
txt
=
io
.
TextIOWrapper
(
io
.
BytesIO
(
self
.
testdata
),
encoding
=
"ASCII"
)
txt
.
_CHUNK_SIZE
=
4
reads
=
txt
.
read
(
4
)
reads
+=
txt
.
read
()
self
.
assertEqual
(
reads
,
self
.
normalized
)
def
test_issue1395_5
(
self
):
txt
=
io
.
TextIOWrapper
(
io
.
BytesIO
(
self
.
testdata
),
encoding
=
"ASCII"
)
txt
.
_CHUNK_SIZE
=
4
reads
=
txt
.
read
(
4
)
pos
=
txt
.
tell
()
txt
.
seek
(
0
)
txt
.
seek
(
pos
)
self
.
assertEqual
(
txt
.
read
(
4
),
"BBB
\
n
"
)
def
test_main
():
support
.
run_unittest
(
TextIOWrapperTest
)
if
__name__
==
"__main__"
:
test_
main
()
unittest
.
main
()
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