This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bcwhite
Recipients amaury.forgeotdarc, bcwhite, purcell
Date 2008-03-06.19:59:02
SpamBayes Score 8.479231e-06
Marked as misclassified No
Message-id <1204833544.93.0.405379126952.issue2241@psf.upfronthosting.co.za>
In-reply-to
Content
Having tests run independently of each other is not the same as having
tests be completely independent.  I'd argue that the latter is
impossible.  You're never going to test the entire system in a single
test case and thus the tests work together (i.e. not independently) to
test everything.

If one function under test calls another function that is also tested,
then it makes sense to test the lower-level function first and display
any problems as it will be easier/faster to find the root of the trouble
than when the error causes unexpected results in the higher-level function.

To make things easier, I simply name my tests such that lower-level
functions are tested first.  Each individual tests still runs
independently, of course.

The point of the "--one" option is just to have it stop when the first
test fails, allowing me to fix the lowest level error.  If that same
error causes a dozen other tests to also fail and I just pick one
failure randomly to start debugging, it's going to take me longer,
perhaps a lot longer, to track down the problem.

As for the method of implementation, I'm sure there are better ways to
do it.  Though I can write fully functional programs in Python, I by no
means consider myself an expert in the language.  I did it this way
because the only other solution I saw was a global variable and figured
that would be a poor way to do it.  As such, I'd appreciate help on
exactly how it should "properly" be done.  :-)

I'll let somebody else actually re-open this issue if it's a desired
item since I'm not knowledgeable enough to see the solution you propose.

Thanks!
History
Date User Action Args
2008-03-06 19:59:05bcwhitesetspambayes_score: 8.47923e-06 -> 8.479231e-06
recipients: + bcwhite, purcell, amaury.forgeotdarc
2008-03-06 19:59:04bcwhitesetspambayes_score: 8.47923e-06 -> 8.47923e-06
messageid: <1204833544.93.0.405379126952.issue2241@psf.upfronthosting.co.za>
2008-03-06 19:59:04bcwhitelinkissue2241 messages
2008-03-06 19:59:02bcwhitecreate