3 ms·
I'm not sure what do you mean exactly... If it's something like: assert foo["bar"] == 123 assert foo["baz"]["bam"]["boo"] = "abc" I don't see how is t
by BerislavLopac 6y ago
I'm not sure what do you mean exactly... If it's something like:
assert foo["bar"] == 123
assert foo["baz"]["bam"]["boo"] = "abc"
I don't see how is that made easier (and less ambiguous) in hamcrest-style assertions...
- calpaterson 6y agoThe case is more like when you want to assert against some of the contents of a dictionary but not all (say 60% of a 30 key dict), and not all those assertions are based on == (and it's a multilevel nested dict). There's no particurly terse why to write an example I'm afraid.