unittest weirdness
Ethan Furman
ethan at stoneleaf.us
Wed Mar 12 20:36:03 EDT 2014
On 03/12/2014 04:38 PM, Steven D'Aprano wrote:
>
> [snip lots of good advice for unit testing]
I was just removing the Personally Identifiable Information. Each test is pulling a payment from a batch of payments,
so the first couple asserts are simply making sure I have the payment I think I have, then I run the routine that is
supposed to match that payment with a bunch of invoices, and then I test to make sure I got back the invoices that I
have manually verified are the correct ones to be returned.
There are many different tests because there are many different paths through the code, depending on exactly which
combination of insanities the bank, the customer, and the company choose to inflict at that moment. ;)
--
~Ethan~
More information about the Python-list
mailing list