Is this a good way to implement testing

Paul Rubin no.email at nospam.invalid
Sat May 2 23:58:59 EDT 2015


Cecil Westerhof <Cecil at decebal.nl> writes:

> Still on my journey to learn Python.
>
> At the moment I define the test functionality in the following way:
>             action = options[0][0]
>             if   action == '--all': ...

Yecch, use an option parsing library for that, whichever one is
currently fashionable.  I think optparse is deprecated now but I still
use it because I'm used to it.

> Is this an acceptable way of working?

You should also use the currently fashionable unit testing library.  I
use unittest because yada yada but I think it's now considered old
school.



More information about the Python-list mailing list