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
9d9dc8eb
Commit
9d9dc8eb
authored
May 06, 2012
by
Nadeem Vawda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test_gzip failures on Windows.
parent
b55d9e3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Lib/test/test_gzip.py
Lib/test/test_gzip.py
+3
-3
No files found.
Lib/test/test_gzip.py
View file @
9d9dc8eb
...
...
@@ -409,7 +409,7 @@ class TestOpen(BaseTest):
self
.
assertEqual
(
file_data
,
uncompressed
*
2
)
def
test_text_modes
(
self
):
uncompressed
=
data1
.
decode
(
"ascii"
)
*
50
uncompressed
=
data1
.
decode
(
"ascii"
)
.
replace
(
"
\
n
"
,
os
.
linesep
)
*
50
with
gzip
.
open
(
self
.
filename
,
"wt"
)
as
f
:
f
.
write
(
uncompressed
)
with
open
(
self
.
filename
,
"rb"
)
as
f
:
...
...
@@ -436,7 +436,7 @@ class TestOpen(BaseTest):
def
test_encoding
(
self
):
# Test non-default encoding.
uncompressed
=
data1
.
decode
(
"ascii"
)
*
50
uncompressed
=
data1
.
decode
(
"ascii"
)
.
replace
(
"
\
n
"
,
os
.
linesep
)
*
50
with
gzip
.
open
(
self
.
filename
,
"wt"
,
encoding
=
"utf-16"
)
as
f
:
f
.
write
(
uncompressed
)
with
open
(
self
.
filename
,
"rb"
)
as
f
:
...
...
@@ -456,7 +456,7 @@ class TestOpen(BaseTest):
def
test_newline
(
self
):
# Test with explicit newline (universal newline mode disabled).
uncompressed
=
data1
.
decode
(
"ascii"
)
*
50
with
gzip
.
open
(
self
.
filename
,
"wt"
)
as
f
:
with
gzip
.
open
(
self
.
filename
,
"wt"
,
newline
=
"
\
n
"
)
as
f
:
f
.
write
(
uncompressed
)
with
gzip
.
open
(
self
.
filename
,
"rt"
,
newline
=
"
\
r
"
)
as
f
:
self
.
assertEqual
(
f
.
readlines
(),
[
uncompressed
])
...
...
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