aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_dist.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-03-18 09:59:32 -0400
committerJason R. Coombs <jaraco@jaraco.com>2018-03-18 09:59:32 -0400
commitb38d71f2935ce069f5f1f6b2ccaa7b99c838db67 (patch)
tree7396e3897d0b744f7ceae4de27529cef89309873 /setuptools/tests/test_dist.py
parentd92bc63ddd88729ad0bd892eacce29439b821fd2 (diff)
downloadexternal_python_setuptools-b38d71f2935ce069f5f1f6b2ccaa7b99c838db67.tar.gz
external_python_setuptools-b38d71f2935ce069f5f1f6b2ccaa7b99c838db67.tar.bz2
external_python_setuptools-b38d71f2935ce069f5f1f6b2ccaa7b99c838db67.zip
Open metadata file with UTF-8 decoding.
Diffstat (limited to 'setuptools/tests/test_dist.py')
-rw-r--r--setuptools/tests/test_dist.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py
index 28b46fd3..8d5c9e38 100644
--- a/setuptools/tests/test_dist.py
+++ b/setuptools/tests/test_dist.py
@@ -2,6 +2,8 @@
from __future__ import unicode_literals
+import io
+
from setuptools import Distribution
from setuptools.extern.six.moves.urllib.request import pathname2url
from setuptools.extern.six.moves.urllib_parse import urljoin
@@ -122,7 +124,7 @@ def test_maintainer_author(name, attrs, tmpdir):
dist.metadata.write_pkg_info(fn_s)
- with open(str(fn.join('PKG-INFO')), 'r') as f:
+ with io.open(str(fn.join('PKG-INFO')), 'r', encoding='utf-8') as f:
pkg_lines = f.readlines()
pkg_lines = [_ for _ in pkg_lines if _] # Drop blank lines