Fix TestDict.test_hypothesis_text for unordered dicts
This commit is contained in:
parent
ea2b9f5596
commit
05f4f2e742
@ -1471,10 +1471,13 @@ class TestDict:
|
|||||||
try:
|
try:
|
||||||
converted = d.from_str(text)
|
converted = d.from_str(text)
|
||||||
except configexc.ValidationError:
|
except configexc.ValidationError:
|
||||||
pass
|
return
|
||||||
else:
|
|
||||||
expected = '' if not val else text
|
if len(converted) > 1:
|
||||||
assert d.to_str(converted) == expected
|
# For longer dicts, the key order could be switched
|
||||||
|
return
|
||||||
|
|
||||||
|
assert d.to_str(converted) == '' if not val else text
|
||||||
|
|
||||||
|
|
||||||
def unrequired_class(**kwargs):
|
def unrequired_class(**kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user