Re: unittest: Calling tests in liner number order



On May 24, 7:22 am, André <andre.robe...@xxxxxxxxx> wrote:


I can't relate to anyone that want to oppose a change that would give
more freedom to a programmer.

André

Well, you can already do that. Or anything else you want. It's not all
that difficult to change the algorithms in the unittest package
_without_ patching the code. How to do it could be better documented,
granted.

For my major project (Python FIT) I've got my own test case extraction
mechanism that doesn't depend on patching the code. It lets me use any
name I want - that is, it doesn't depend on any kind of pattern match.
(It also avoids looking in subclasses for tests.) I find the naming
freedom to be quite useful in thinking about the test case.

I really don't care what the OP does in his own projects. My objection
is that, if it goes into the standard library, is that it passes a
signal that it's good practice to allow dependencies between tests. It
most definitely is _not_ good practice.

I like the technique of looking at the line numbers to get the
declaration order; it ought to be documented somewhere.

The proper place for this is either a recipe (
http://aspn.activestate.com/ASPN/Cookbook/Python/ ) or a note in the
documentation with a caveat that it's not good practice, but it may be
useful in some circumstances.

John Roth



.



Relevant Pages

  • Re: The Schneider Scam
    ... You can't fail somebody for driving, ... him the practice time, or you don't allow him to complete the course. ... I don't know about a dumbell, since I asked you to e-mail me documentation. ... First of all Schneider training isn't free, ...
    (misc.transport.trucking)
  • Re: relative-to-source file names (was: Small, understandable Forth)
    ... Zero existing practice, and no user demand. ... And: Code breaker. ... various operating systems. ... you certainly cannot expect me to read 323 pages of documentation ...
    (comp.lang.forth)
  • Re: Poll results: User views on the FDL issue
    ... It seems that freedom is a bit over rated here. ... it fit for your own use is a good thing in the name of free software. ... some documentation in with invariant sections is not that bad. ... > at the Tel-Aviv University CC. ...
    (Debian-User)
  • Re: There were actually a Muslim prayer area in both of the Twin Towers
    ... If someone wants to say a prayer, meditate in silence, or bow to the east, it is their business. ... I am merely stating that everybody has a spiritual side to them, no matter how they practice it. ... I am all about freedom. ... That means freedom to discuss beliefs or freedom to have beliefs, as well as freedom not to do either one. ...
    (soc.retirement)
  • Re: Filtering a tachometer generator
    ... Jerry Avins wrote: ... > As for documentation, it has been my practice to write down what needs ... > produce working code from it, ... It has been common practice in the places I have worked not ...
    (comp.dsp)