Commit 45f6ce2a authored by Jason R. Coombs's avatar Jason R. Coombs

Add test asserting that install_requires parameters cannot be unordered. Ref #458.

parent c461d513
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment