aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2019-02-17 17:37:01 -0500
committerJason R. Coombs <jaraco@jaraco.com>2019-02-17 17:37:40 -0500
commit7f7780e5b572d6fcacd63bf99389dd9f48c5345c (patch)
treeb0819a54a0647fe08faf8c546d22e3fd836cdf07 /setuptools/tests
parent636070d9922f1443ae98b0fdd45b6c74c3c9af11 (diff)
downloadexternal_python_setuptools-7f7780e5b572d6fcacd63bf99389dd9f48c5345c.tar.gz
external_python_setuptools-7f7780e5b572d6fcacd63bf99389dd9f48c5345c.tar.bz2
external_python_setuptools-7f7780e5b572d6fcacd63bf99389dd9f48c5345c.zip
In tests, force deterministic ordering on extras_require so tests pass.
Diffstat (limited to 'setuptools/tests')
-rw-r--r--setuptools/tests/test_dist.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/setuptools/tests/test_dist.py b/setuptools/tests/test_dist.py
index e349d068..0c0b9d66 100644
--- a/setuptools/tests/test_dist.py
+++ b/setuptools/tests/test_dist.py
@@ -3,6 +3,8 @@
from __future__ import unicode_literals
import io
+import collections
+
from setuptools.dist import DistDeprecationWarning, _get_unpatched
from setuptools import Distribution
from setuptools.extern.six.moves.urllib.request import pathname2url
@@ -266,13 +268,13 @@ def test_maintainer_author(name, attrs, tmpdir):
def test_provides_extras_deterministic_order():
- attrs = dict(extras_require=dict(
- a=['foo'],
- b=['bar'],
- ))
+ extras = collections.OrderedDict()
+ extras['a'] = ['foo']
+ extras['b'] = ['bar']
+ attrs = dict(extras_require=extras)
dist = Distribution(attrs)
assert dist.metadata.provides_extras == ['a', 'b']
- attrs['extras_require'] = dict(
+ attrs['extras_require'] = collections.OrderedDict(
reversed(list(attrs['extras_require'].items())))
dist = Distribution(attrs)
assert dist.metadata.provides_extras == ['b', 'a']