connect four (game)

Michael Torrie torriem at gmail.com
Sat Nov 25 11:07:57 EST 2017


On 11/25/2017 06:00 AM, bartc wrote:
> And there's a quite lot left of the rest of the program to worry about too!
> 
> If you add 'window()' at the end of the program, then it seems to run on 
> Python 3. I'd play around with it first before thinking up strategies 
> for testing it.

Actually, no.  Unit testing ideally should be done for each and every
class as they are being written (before they are written in fact), no
matter how small and trivial the class.  That way as you compose larger
and larger units of code, the chances of things being right is greater
compared to doing it the other way around.

You may argue that testing doesn't matter for his small game, written
for his own education and amusement.  The fact is that software in
general is of abysmal quality across the boards, and promoting a habit
of unit testing is good, even for trivial, home-grown stuff.





More information about the Python-list mailing list