diff options
| author | Xavier Fernandez <xavier.fernandez@polyconseil.fr> | 2016-07-17 14:52:16 +0200 |
|---|---|---|
| committer | Xavier Fernandez <xavier.fernandez@polyconseil.fr> | 2016-07-21 11:28:38 +0200 |
| commit | d079163e74166860fedbfe0abcfcb820507368fd (patch) | |
| tree | 69539ea65f1b2f67efde8885c31a955e7ea4eccd /setuptools/tests | |
| parent | fd3ff004cd3570460a079de785846f54ae1ee36f (diff) | |
| download | python-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.py | 6 |
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( |
