From df4ff08be41e2013b41f575d0a0ed61e74d4c0ad Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Wed, 22 Jul 2009 00:19:57 +0000 Subject: Fix open_urlresource() to pass its arguments to open() when the resource is cached. This fixes the failure of test_normalization on the Windows buildbots, where the Normalization.txt file was read as a MBCS text file, instead as a UTF-8 one. --- Lib/test/support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/support.py b/Lib/test/support.py index e11fbae..04964a1 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -455,7 +455,7 @@ def open_urlresource(url, *args, **kw): fn = os.path.join(os.path.dirname(__file__), "data", filename) if os.path.exists(fn): - return open(fn) + return open(fn, *args, **kw) print('\tfetching %s ...' % url, file=get_original_stdout()) fn, _ = urllib.request.urlretrieve(url, fn) -- cgit v0.12