Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100250
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: python unit test frame work |
| Date | 2015-12-11 14:09 +1100 |
| Message-ID | <mailman.126.1449803373.12405.python-list@python.org> (permalink) |
| References | <CACT3xuXS5zcppQ4W0dxigi=Pv99doH81_KpttR=+3WSrOuOzzw@mail.gmail.com> <20151211004021.GA84387@cskk.homeip.net> |
Cameron Simpson <cs@zip.com.au> writes: > First, as Ben remarks, if one test _depends_ on an earlier one then it > isn't a real unit test. > > On the other hand, if you simply have some simple tests followed by > more complex tests (I have several like this) you have two facilities > to help you. > > Firstly, I have observed that unittest tends to run tests in lexical > order Back on the first hand again, some unit test runners will deliberately *change* the order so your test cases are tested for independence. Really, if your test cases depend on being executed in a particular sequence, the ‘unittest’ module is a poor fit. -- \ “Come on, if your religion is so vulnerable that a little bit | `\ of disrespect is going to bring it down, it's not worth | _o__) believing in, frankly.” —Terry Gilliam, 2005-01-18 | Ben Finney
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: python unit test frame work Ben Finney <ben+python@benfinney.id.au> - 2015-12-11 14:09 +1100
csiph-web