Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #100250 > unrolled thread

Re: python unit test frame work

Started byBen Finney <ben+python@benfinney.id.au>
First post2015-12-11 14:09 +1100
Last post2015-12-11 14:09 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: python unit test frame work Ben Finney <ben+python@benfinney.id.au> - 2015-12-11 14:09 +1100

#100250 — Re: python unit test frame work

FromBen Finney <ben+python@benfinney.id.au>
Date2015-12-11 14:09 +1100
SubjectRe: python unit test frame work
Message-ID<mailman.126.1449803373.12405.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web