[py-dev] Gitting rid of "(inconsistently failed then succeeded)" ?
Philippe Fremy
phil at freehackers.org
Thu Apr 23 18:00:34 CEST 2009
Hi,
I am getting "(inconsistently failed then succeeded)" which are quite
annoying. It's for code that checks conditions maniuplated by threads:
t = threading.Thread( target=checker.start, args=(elcConfig,
result) )
t.start()
time.sleep( 0.1 )
checker.stop( False )
if not t.isAlive(): assert False
if checker.isFinished(): assert False
checker.join()
> if t.isAlive(): assert False
E AssertionError: (inconsistently failed then succeeded)
I am playing a bit with race conditions here, but should that be a
reason for my test to fail ? The conditions that I am checking arrive in
the right order, only py.test is complaining.
Any way I can get rid of "(inconsistently failed then succeeded)" ?
cheers,
Philippe
More information about the py-dev
mailing list