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
234a34a5
Commit
234a34a5
authored
Aug 30, 2007
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explicitly use UTF-8 as the encoding for the normalization file.
parent
5495957b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Lib/test/test_normalization.py
Lib/test/test_normalization.py
+1
-1
Lib/test/test_support.py
Lib/test/test_support.py
+3
-3
No files found.
Lib/test/test_normalization.py
View file @
234a34a5
...
...
@@ -33,7 +33,7 @@ def unistr(data):
class
NormalizationTest
(
unittest
.
TestCase
):
def
test_main
(
self
):
part1_data
=
{}
for
line
in
open_urlresource
(
TESTDATAURL
):
for
line
in
open_urlresource
(
TESTDATAURL
,
encoding
=
"utf-8"
):
if
'#'
in
line
:
line
=
line
.
split
(
'#'
)[
0
]
line
=
line
.
strip
()
...
...
Lib/test/test_support.py
View file @
234a34a5
...
...
@@ -244,7 +244,7 @@ def check_syntax_error(testcase, statement):
else
:
testcase
.
fail
(
'Missing SyntaxError: "%s"'
%
statement
)
def
open_urlresource
(
url
):
def
open_urlresource
(
url
,
*
args
,
**
kw
):
import
urllib
,
urlparse
requires
(
'urlfetch'
)
...
...
@@ -253,11 +253,11 @@ def open_urlresource(url):
for
path
in
[
os
.
path
.
curdir
,
os
.
path
.
pardir
]:
fn
=
os
.
path
.
join
(
path
,
filename
)
if
os
.
path
.
exists
(
fn
):
return
open
(
fn
)
return
open
(
fn
,
*
args
,
**
kw
)
print
(
'
\
t
fetching %s ...'
%
url
,
file
=
get_original_stdout
())
fn
,
_
=
urllib
.
urlretrieve
(
url
,
filename
)
return
open
(
fn
)
return
open
(
fn
,
*
args
,
**
kw
)
class
WarningMessage
(
object
):
...
...
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