aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_egg_info.py
diff options
context:
space:
mode:
authorwim glenn <hey@wimglenn.com>2018-03-16 01:14:19 -0500
committerwim glenn <hey@wimglenn.com>2018-03-16 01:14:19 -0500
commit9e554095b4e987371f7929902d12278b4e2ad91e (patch)
tree49802283ec2bd78b43710be96c01f39de934b650 /setuptools/tests/test_egg_info.py
parent16187afb3f532199f4951801d4e39939c560facc (diff)
downloadexternal_python_setuptools-9e554095b4e987371f7929902d12278b4e2ad91e.tar.gz
external_python_setuptools-9e554095b4e987371f7929902d12278b4e2ad91e.tar.bz2
external_python_setuptools-9e554095b4e987371f7929902d12278b4e2ad91e.zip
provide a failing test case for regression introduced in b2ea3c4a - spurious "Provides-Extra:" generated in metadata
Diffstat (limited to 'setuptools/tests/test_egg_info.py')
-rw-r--r--setuptools/tests/test_egg_info.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
index ff5fa0a3..d2211671 100644
--- a/setuptools/tests/test_egg_info.py
+++ b/setuptools/tests/test_egg_info.py
@@ -438,6 +438,23 @@ class TestEggInfo(object):
assert 'Provides-Extra: foobar' in pkg_info_lines
assert 'Metadata-Version: 2.1' in pkg_info_lines
+ def test_doesnt_provides_extra(self, tmpdir_cwd, env):
+ self._setup_script_with_requires(
+ '''install_requires=["spam ; python_version<'3.3'"]''')
+ environ = os.environ.copy().update(
+ HOME=env.paths['home'],
+ )
+ 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_text = pkginfo_file.read()
+ assert 'Provides-Extra:' not in pkg_info_text
+
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`