This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: unittest.main(verbosity=2) broke in python31, worked when I had python27
Type: behavior Stage:
Components: Versions: Python 3.1
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, michael.foord, r.david.murray, teherr
Priority: normal Keywords:

Created on 2010-11-18 20:16 by teherr, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg121492 - (view) Author: Terry Herron (teherr) Date: 2010-11-18 20:16
The unittest.py module no longer accepts verbosity=2 when calling main.  This worked in Python27.  Example...

     unittest.main(verbosity=2)
     

## THE FIX IN unittest.py##
CHANGE FROM:
1547   def __init__(self, module='__main__', defaultTest=None,
1548           argv=None, testRunner=TextTestRunner,
1549           testLoader=defaultTestLoader, exit=True):

1560       self.verbosity = 1

CHANGE TO:
1547   def __init__(self, module='__main__', defaultTest=None,
1548           argv=None, testRunner=TextTestRunner,
1549           testLoader=defaultTestLoader, exit=True, verbosity=1):

1560       self.verbosity = verbosity
msg121494 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-11-18 20:44
2.7 is post-3.1.  This works as you expect in 3.2.  This is, it is a new feature in both 2.7 and 3.2.

(NB: this is why I wanted 3.2 to come out close to 2.7, but fortunately this is the first report like this I think we've gotten.)
History
Date User Action Args
2022-04-11 14:57:09adminsetgithub: 54665
2010-11-18 20:44:04r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg121494

resolution: out of date
2010-11-18 20:17:50ezio.melottisetnosy: + ezio.melotti, michael.foord
2010-11-18 20:16:49teherrcreate