testtools-dev team mailing list archive
-
testtools-dev team
-
Mailing list archive
-
Message #01015
Re: [Merge] lp:~rvb/testtools/testtools-contains-all into lp:testtools
> Thanks for the patch, Raphaël.
>
> I don't quite understand the matcher though. From the docstring and the name,
> I would have guess something like this::
>
> self.assertThat([1, 2, 3], ContainsAll([3, 1]))
>
> That is, self.assertThat(Y, ContainsAll(X)) would pass if and only if X is a
> subset of Y.
Indeed, that's precisely what this matcher does. Again, it's simply a shortcut, it uses existing functionality.
> As it is, self.assertThat(Y, ContainsAll(X)) passes iff for all y in Y, for
> all x in X, x in y. (i.e. ∀ y ∊ Y, ∀ x ∊ X, 'x in y')
Maybe I'm missing something but that's not what this matcher does. I can't resist using these nice utf8 characters:
self.assertThat(y, ContainsAll(X)) passes iff for all x in X, x in y. (i.e. ∀ x ∊ X, 'x in y')
--
https://code.launchpad.net/~rvb/testtools/testtools-contains-all/+merge/104065
Your team testtools developers is subscribed to branch lp:testtools.
References