Brian White added the comment: 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! __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2241> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com