[New-bugs-announce] [issue2674] unittest.TestProgram uses sys.exit()

Johan Tufvesson report at bugs.python.org
Wed Apr 23 15:59:47 CEST 2008


New submission from Johan Tufvesson <tuben at users.sourceforge.net>:

The class TestProgram (and its synonym "main") in module unittest is
(probably) meant to be an easy way to use the functionality of the
module unittest. It is very surprising (and error-prone) that it uses
sys.exit() with a status code instead of making a return with the same
status code.

Clean-up actions after the call to unittest.main() are not executed.

----------
components: Library (Lib)
messages: 65698
nosy: tuben
severity: normal
status: open
title: unittest.TestProgram uses sys.exit()
type: behavior
versions: Python 2.5

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2674>
__________________________________


More information about the New-bugs-announce mailing list