Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #89828
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Subject | Re: Is this a good way to implement testing |
| Date | 2015-05-03 14:49 +1000 |
| References | <878ud6mx4y.fsf@Equus.decebal.nl> <87k2wq2tx8.fsf@jester.gateway.sonic.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.45.1430628582.12865.python-list@python.org> (permalink) |
Paul Rubin <no.email@nospam.invalid> writes: > Cecil Westerhof <Cecil@decebal.nl> writes: > > > 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. Yes, ‘optparse’ has been superseded by the more capable ‘argparse’ library <URL:https://docs.python.org/3/library/argparse.html>. Migrating from ‘optparse’ to ‘argparse’ is quite straightforward, since the latter was designed to be very similar. > > 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. I disagree, using ‘unittest’ is still quite normal. It's also in the standard library, unlike proposed replacements. -- \ “Instead of having ‘answers’ on a math test, they should just | `\ call them ‘impressions’, and if you got a different | _o__) ‘impression’, so what, can't we all be brothers?” —Jack Handey | Ben Finney
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is this a good way to implement testing Cecil Westerhof <Cecil@decebal.nl> - 2015-05-03 00:29 +0200
Re: Is this a good way to implement testing Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-03 00:17 +0100
Re: Is this a good way to implement testing Terry Reedy <tjreedy@udel.edu> - 2015-05-02 20:06 -0400
Re: Is this a good way to implement testing Paul Rubin <no.email@nospam.invalid> - 2015-05-02 20:58 -0700
Re: Is this a good way to implement testing Ben Finney <ben+python@benfinney.id.au> - 2015-05-03 14:49 +1000
Re: Is this a good way to implement testing Cecil Westerhof <Cecil@decebal.nl> - 2015-05-03 09:36 +0200
Re: Is this a good way to implement testing Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-03 09:38 +0100
Re: Is this a good way to implement testing Peter Otten <__peter__@web.de> - 2015-05-03 10:45 +0200
Re: Is this a good way to implement testing Cecil Westerhof <Cecil@decebal.nl> - 2015-05-03 11:49 +0200
Re: Is this a good way to implement testing Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-03 11:21 +0100
Re: Is this a good way to implement testing Cecil Westerhof <Cecil@decebal.nl> - 2015-05-03 12:50 +0200
Re: Is this a good way to implement testing Ben Finney <ben+python@benfinney.id.au> - 2015-05-03 18:52 +1000
Re: Is this a good way to implement testing Peter Otten <__peter__@web.de> - 2015-05-03 11:22 +0200
csiph-web