Opened 5 years ago

Last modified 5 years ago

#6199 defect new

SynchronousTestCase doesn't always flush logged failures

Reported by: therve Owned by:
Priority: normal Milestone:
Component: trial Keywords:
Cc: Jonathan Lange Branch:
Author:

Description

If a test case logs a failure, but then fails for some other reasons (like a failed assert), flushErrors is not called, and thus the logged failure leaks to the next test.

Attachments (1)

t.py (273 bytes) - added by therve 5 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 5 years ago by DefaultCC Plugin

Cc: Jonathan Lange added

Changed 5 years ago by therve

Attachment: t.py added

comment:2 Changed 5 years ago by therve

The attached test file reproduces the problem for me: both test_1 and test_2 fails, whereas test_2 is correct.

comment:3 Changed 5 years ago by Jean-Paul Calderone

Summary: SynchronousTestCase doesn't always clean failuresSynchronousTestCase doesn't always flush logged failures
Note: See TracTickets for help on using tickets.