Message123153
Reported by a unittest2 user.
A SystemExit (or GeneratorExit) will cause a test run to stop in 2.7 / 3.2. This would just be reported as an error in 2.6.
>>> from unittest import TestCase
>>> def test(s):
... raise GeneratorExit
...
>>> class T(TestCase):
... test = test
...
>>> t = T('test')
>>> t.run()
Above code works in Python 2.6 (the exception is caught by TestCase.run) but dies in 2.7 / 3.2 |
|
| Date |
User |
Action |
Args |
| 2010-12-03 01:25:19 | michael.foord | set | recipients:
+ michael.foord |
| 2010-12-03 01:25:19 | michael.foord | set | messageid: <1291339519.59.0.737922107849.issue10611@psf.upfronthosting.co.za> |
| 2010-12-03 01:25:17 | michael.foord | link | issue10611 messages |
| 2010-12-03 01:25:16 | michael.foord | create | |
|