Author: martin.v.loewis
Date: Thu Aug 30 22:58:02 2007
New Revision: 57767
Modified:
python/branches/py3k/Lib/test/test_normalization.py
python/branches/py3k/Lib/test/test_support.py
Log:
Explicitly use UTF-8 as the encoding for the normalization file.
Modified: python/branches/py3k/Lib/test/test_normalization.py
==============================================================================
--- python/branches/py3k/Lib/test/test_normalization.py (original)
+++ python/branches/py3k/Lib/test/test_normalization.py Thu Aug 30 22:58:02 2007
@@ -33,7 +33,7 @@
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()
Modified: python/branches/py3k/Lib/test/test_support.py
==============================================================================
--- python/branches/py3k/Lib/test/test_support.py (original)
+++ python/branches/py3k/Lib/test/test_support.py Thu Aug 30 22:58:02 2007
@@ -244,7 +244,7 @@
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 @@
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('\tfetching %s ...' % url, file=get_original_stdout())
fn, _ = urllib.urlretrieve(url, filename)
- return open(fn)
+ return open(fn, *args, **kw)
class WarningMessage(object):
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins