Fix TestDict.test_hypothesis_text for unordered dicts

This commit is contained in:
Florian Bruhin 2017-07-04 09:47:52 +02:00
parent ea2b9f5596
commit 05f4f2e742

View File

@ -1471,10 +1471,13 @@ class TestDict:
try:
converted = d.from_str(text)
except configexc.ValidationError:
pass
else:
expected = '' if not val else text
assert d.to_str(converted) == expected
return
if len(converted) > 1:
# For longer dicts, the key order could be switched
return
assert d.to_str(converted) == '' if not val else text
def unrequired_class(**kwargs):