diff options
| author | Dustin Ingram <di@users.noreply.github.com> | 2018-03-05 21:57:06 -0600 |
|---|---|---|
| committer | Dustin Ingram <di@users.noreply.github.com> | 2018-03-14 17:02:25 -0500 |
| commit | b2ea3c4a20d008622caec445f5b6916ddd420d16 (patch) | |
| tree | ebb45f19da3df191cf0527053aec5fb3646d3c60 /setuptools/tests/test_egg_info.py | |
| parent | 4176ab560a4863ed44b8e8c5424e6748c5e45a84 (diff) | |
| download | external_python_setuptools-b2ea3c4a20d008622caec445f5b6916ddd420d16.tar.gz external_python_setuptools-b2ea3c4a20d008622caec445f5b6916ddd420d16.tar.bz2 external_python_setuptools-b2ea3c4a20d008622caec445f5b6916ddd420d16.zip | |
Updates for PEP 566 (Metadata 2.1)
Diffstat (limited to 'setuptools/tests/test_egg_info.py')
| -rw-r--r-- | setuptools/tests/test_egg_info.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 7d12434e..ff5fa0a3 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -420,6 +420,24 @@ class TestEggInfo(object): self._run_install_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + def test_provides_extra(self, tmpdir_cwd, env): + self._setup_script_with_requires( + 'extras_require={"foobar": ["barbazquux"]},') + environ = os.environ.copy().update( + HOME=env.paths['home'], + ) + code, data = environment.run_setup_py( + cmd=['egg_info'], + pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]), + data_stream=1, + env=environ, + ) + egg_info_dir = os.path.join('.', 'foo.egg-info') + with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file: + pkg_info_lines = pkginfo_file.read().split('\n') + assert 'Provides-Extra: foobar' in pkg_info_lines + assert 'Metadata-Version: 2.1' in pkg_info_lines + def test_long_description_content_type(self, tmpdir_cwd, env): # Test that specifying a `long_description_content_type` keyword arg to # the `setup` function results in writing a `Description-Content-Type` @@ -444,6 +462,7 @@ class TestEggInfo(object): pkg_info_lines = pkginfo_file.read().split('\n') expected_line = 'Description-Content-Type: text/markdown' assert expected_line in pkg_info_lines + assert 'Metadata-Version: 2.1' in pkg_info_lines def test_project_urls(self, tmpdir_cwd, env): # Test that specifying a `project_urls` dict to the `setup` |
