summaryrefslogtreecommitdiff
path: root/setuptools/tests
diff options
context:
space:
mode:
authorXavier Fernandez <xavier.fernandez@polyconseil.fr>2016-07-17 14:52:16 +0200
committerXavier Fernandez <xavier.fernandez@polyconseil.fr>2016-07-21 11:28:38 +0200
commitd079163e74166860fedbfe0abcfcb820507368fd (patch)
tree69539ea65f1b2f67efde8885c31a955e7ea4eccd /setuptools/tests
parentfd3ff004cd3570460a079de785846f54ae1ee36f (diff)
downloadpython-setuptools-git-d079163e74166860fedbfe0abcfcb820507368fd.tar.gz
Also update the Metadata-Version when adding Requires-Python
Diffstat (limited to 'setuptools/tests')
-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(