diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-11-25 09:37:29 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-11-25 09:37:29 -0500 |
commit | 45f6ce2afb10aed556fec33c16b765728133f59a (patch) | |
tree | 6fcc7bc33ef7ed12c0218c9faebb04c4dfb2357e /setuptools/tests/test_egg_info.py | |
parent | c461d5134f2aa89a4f6883f15bb84929b10f7ebf (diff) | |
download | external_python_setuptools-45f6ce2afb10aed556fec33c16b765728133f59a.tar.gz external_python_setuptools-45f6ce2afb10aed556fec33c16b765728133f59a.tar.bz2 external_python_setuptools-45f6ce2afb10aed556fec33c16b765728133f59a.zip |
Add test asserting that install_requires parameters cannot be unordered. Ref #458.
Diffstat (limited to 'setuptools/tests/test_egg_info.py')
-rw-r--r-- | setuptools/tests/test_egg_info.py | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 774efb86..66ca9164 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -245,20 +245,6 @@ class TestEggInfo(object): ''', ''' - install_requires_set_deterministic - - install_requires={{"fake-factory==0.5.2", "pytz"}} - - [options] - install_requires = - fake-factory==0.5.2 - pytz - - fake-factory==0.5.2 - pytz - ''', - - ''' install_requires_with_marker install_requires=["barbazquux;{mismatch_marker}"], @@ -407,6 +393,17 @@ class TestEggInfo(object): assert install_requires.lstrip() == expected_requires assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + def test_install_requires_unordered_disallowed(self, tmpdir_cwd, env): + """ + Packages that pass unordered install_requires sequences + should be rejected as they produce non-deterministic + builds. See #458. + """ + req = 'install_requires={"fake-factory==0.5.2", "pytz"}' + self._setup_script_with_requires(req) + with pytest.raises(AssertionError): + self._run_install_command(tmpdir_cwd, env) + def test_extras_require_with_invalid_marker(self, tmpdir_cwd, env): tmpl = 'extras_require={{":{marker}": ["barbazquux"]}},' req = tmpl.format(marker=self.invalid_marker) |