Message159930
| Author |
eric.smith |
| Recipients |
eric.smith, larry, loewis, mark.dickinson, serhiy.storchaka |
| Date |
2012年05月04日.12:28:31 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1336134514.24.0.0752833566615.issue14705@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Now that I think about this some more, I think I'd structure the 'p' tests as:
for expr in [False, None, True, 1, 0]: # add the rest
self.assertEqual(bool(expr), getargs_p(expr))
Since the salient point is that 'p' returns the same value as bool(), right?
And for the one that raises an exception, you'll have to check that bool and getargs_p both raise the same type of exception. |
|