How to have unittest tests to be executed in the order they appear?

Ben Finney bignose+hates-spam at benfinney.id.au
Fri Apr 18 02:46:15 EDT 2008


Roy Smith <roy at panix.com> writes:

> Ben Finney <bignose+hates-spam at benfinney.id.au> wrote:
> 
> > Surely, since "suddenly" implies you changed one small area of the
> > code, that area of the code is the best place to look for what caused
> > the failure.
> 
> Sometimes it's the environment that's changed. Yes, I know, a good
> unit test doesn't depend on the environment, but in real life,
> that's sometimes difficult to achieve.

Fair enough, I hadn't considered that case of "suddenly".

In that case, I would recommend a change to the test *reporter*, so
that the tests are still run in an arbitrary sequence, but the
failures are reported in some desired sequence.

-- 
 \                             “Holy tintinnabulation, Batman!” —Robin |
  `\                                                                   |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list