testtools-dev team mailing list archive
-
testtools-dev team
-
Mailing list archive
-
Message #01071
Re: [Merge] lp:~jml/testtools/dict-matcher into lp:testtools
+ " 'baz': 'qux' matches Equals('qux'),\n"
487
So this shows equal keyvalues? Would it be nicer to elide them entirely?
The SuperDict / SubDict thing weirds me out.
IIUC:
self.assertThat({'a': 'b'}, SubDict({'a': 'b'}))
will pass, as written.
But
self.assertThat({'a': 'b'}, Contains({}))
is an existing matcher that is easier to read and seems to do the same job.
I guess I'd like SubDict and SuperDict to be more clear about whether their constructor is the thing that should be a superdict or a subdict, and I'd love it if the simpler Contains were the goto thing here.
ContainsAll also looks redundantish here.
tl;dr - I think we need to do some orthogonalising and deduplicating.
--
https://code.launchpad.net/~jml/testtools/dict-matcher/+merge/118567
Your team testtools developers is subscribed to branch lp:testtools.
Follow ups
References