Failing unittest Test cases
bokr at oz.net
Thu Jan 12 14:34:02 EST 2006
On Tue, 10 Jan 2006 11:13:20 +0100, Peter Otten <__peter__ at web.de> wrote:
>Duncan Booth wrote:
>> Peter Otten wrote:
>>> Marking a unittest as "should fail" in the test suite seems just wrong
>>> to me, whatever the implementation details may be. If at all, I would
>>> apply a "I know these tests to fail, don't bother me with the messages
>>> for now" filter further down the chain, in the TestRunner maybe.
>>> Perhaps the code for platform-specific failures could be generalized?
>> It isn't marking the test as "should fail" it is marking it as "should
>> pass, but currently doesn't" which is a very different thing.
>You're right of course. I still think the "currently doesn't pass" marker
>doesn't belong into the test source.
Perhaps in a config file that can specify special conditions re running
identified tests? E.g., don't run vs run and report (warn/fail/info)
changed result (e.g. from cached result) vs run and report if pass etc.
Then if code change unexpectedly makes a test work, the config file can just
be updated, not the test.
More information about the Python-list