mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
SF patch# 1766592 by Paul Colomiets.
Fix test_zipimport.
This commit is contained in:
parent
6afaeb757a
commit
ad8d30092c
4 changed files with 31 additions and 25 deletions
|
@ -209,7 +209,7 @@ def _load_testfile(filename, package, module_relative):
|
|||
filename = _module_relative_path(package, filename)
|
||||
if hasattr(package, '__loader__'):
|
||||
if hasattr(package.__loader__, 'get_data'):
|
||||
return package.__loader__.get_data(filename), filename
|
||||
return package.__loader__.get_data(filename).decode('utf-8'), filename
|
||||
return open(filename, encoding="utf-8").read(), filename
|
||||
|
||||
def _indent(s, indent=4):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue