You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the expected object is not a dict, an error occurs:
expect({ 'x': 1 }).to_be_like('qwe')
Fails with:
...
File "/Users/heynemann/.virtualenvs/level/lib/python3.6/site-packages/preggy/core.py", line 285, in _assert_topic
return _registered_assertions[method_name](self.topic, *args, **kw)
File "/Users/heynemann/.virtualenvs/level/lib/python3.6/site-packages/preggy/core.py", line 58, in wrapper
func(*args, **kw)
File "/Users/heynemann/.virtualenvs/level/lib/python3.6/site-packages/preggy/assertions/like.py", line 228, in to_be_like
result = _match_alike(expected, topic, diff=diff)
File "/Users/heynemann/.virtualenvs/level/lib/python3.6/site-packages/preggy/assertions/like.py", line 99, in _match_alike
return _compare_dicts(expected, topic)
File "/Users/heynemann/.virtualenvs/level/lib/python3.6/site-packages/preggy/assertions/like.py", line 171, in _compare_dicts
return _match_dicts(expected, topic) and _match_dicts(topic, expected)
File "/Users/heynemann/.virtualenvs/level/lib/python3.6/site-packages/preggy/assertions/like.py", line 176, in _match_dicts
for k, v in expected.items():
AttributeError: 'str' object has no attribute 'items'
The text was updated successfully, but these errors were encountered:
If the expected object is not a dict, an error occurs:
Fails with:
The text was updated successfully, but these errors were encountered: