classification
Title: unittest command line behaviour
Type: enhancement Stage: commit review
Components: Library (Lib) Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: michael.foord Nosy List: michael.foord, pitrou
Priority: normal Keywords: easy, patch

Created on 2009-05-11 10:59 by michael.foord, last changed 2009-05-12 10:50 by michael.foord. This issue is now closed.

Files
File name Uploaded Description Edit
unittest.patch michael.foord, 2009-05-11 10:59
Messages (5)
msg87571 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2009-05-11 10:59
This patch adds a verbosity keyword argument to unittest.main - so you
can do:

    if __name__ == '__main__':
       unittest.main(verbosity=2)

It also has a minor fix allowing you to specify test modules / classes
from the command line. This enables unittest to be used like this:

    python -m unittest test_module
    python -m unittest test_module.TestClass

Which is quite funky.
msg87572 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-05-11 13:23
It would be nice to have a test for the command line functionality but
I'm not sure it's easy.
In Misc/NEWS, please add the issue number as in other entries.
Other than that, looks fine.
msg87573 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2009-05-11 13:26
I didn't add the issue number because I created the patch prior to
creating the issue. Will add when I commit. Would like permission to
commit this from an interested core developer.
msg87583 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2009-05-11 18:00
Committed in revision 72570.
msg87614 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2009-05-12 10:50
This commit caused a regression in command line behavior of modules
using unittest.main(). Fixed in revision 72583.
History
Date User Action Args
2009-05-12 10:50:45michael.foordsetkeywords: patch, patch, easy

messages: + msg87614
2009-05-11 18:00:10michael.foordsetstatus: open -> closed
keywords: patch, patch, easy
messages: + msg87583
2009-05-11 13:26:59michael.foordsetkeywords: patch, patch, easy

messages: + msg87573
2009-05-11 13:23:52pitrousetpriority: normal


keywords: - needs review
nosy: + pitrou
messages: + msg87572
resolution: accepted
stage: patch review -> commit review
2009-05-11 10:59:47michael.foordcreate