From 45f6ce2afb10aed556fec33c16b765728133f59a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 25 Nov 2017 09:37:29 -0500 Subject: Add test asserting that install_requires parameters cannot be unordered. Ref #458. --- setuptools/tests/test_egg_info.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'setuptools/tests/test_egg_info.py') 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 @@ -244,20 +244,6 @@ class TestEggInfo(object): pytz ''', - ''' - 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 @@ -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) -- cgit v1.2.3