tests that call sys.exit(0) appear to pass

Bug #1364188 reported by Robert Collins on 2014-09-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Critical
Robert Collins

Bug Description

def test_foo(self):
     sys.exit(0)

this will bubble up to the top exiting the process without a) calling addError for the test or b) exiting non-zero, so the only sign the test was run will be the test count being too-low.

I don't believe this was intended. For comparison unittest catches the exception (but not KeyboardInterrupt...) and triggers an error.

Changed in testtools:
assignee: nobody → Robert Collins (lifeless)
milestone: none → next
status: Triaged → Fix Committed
Changed in testtools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers