aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_egg_info.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/tests/test_egg_info.py')
-rw-r--r--setuptools/tests/test_egg_info.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
index 0b9da538..dff2a8c8 100644
--- a/setuptools/tests/test_egg_info.py
+++ b/setuptools/tests/test_egg_info.py
@@ -223,8 +223,10 @@ class TestEggInfo(object):
env=environ,
)
egg_info_dir = os.path.join('.', 'foo.egg-info')
- pkginfo = os.path.join(egg_info_dir, 'PKG-INFO')
- assert 'Requires-Python: >=2.7.12' in open(pkginfo).read().split('\n')
+ with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file:
+ pkg_info_lines = pkginfo_file.read().split('\n')
+ assert 'Requires-Python: >=2.7.12' in pkg_info_lines
+ assert 'Metadata-Version: 1.2' in pkg_info_lines
def test_python_requires_install(self, tmpdir_cwd, env):
self._setup_script_with_requires(