← Back to team overview

testtools-dev team mailing list archive

Re: [Merge] lp:~kampka/testtools/assert-is-none into lp:testtools

 

Thanks for the feedback.

The main reason for this is the first one. I'm currently in the process of porting unittest2 tests to testtools and I used assertIs(Not)None quite a lot.
On the other hand, it is mutch more convenient than using the matcher directly because for assertIsNotNone the matcher equivalent would be self.assertThat(something, Annotation(message, Not(Is(None)))). 
In my opinion, test code does not only be easy to write but also easy to read and stacking matchers like that is not really helping, especially if the message part is a little longer.
That being said, I am all for making matcher easier to work, but I am not sure that can be done without larger changes. The proposed code is an easy and (hopefully) fast way to get the needed functionality upstream.

Cheers,
Chris

-- 
https://code.launchpad.net/~kampka/testtools/assert-is-none/+merge/64868
Your team testtools developers is subscribed to branch lp:testtools.


References