Message123153
| Author |
michael.foord |
| Recipients |
michael.foord |
| Date |
2010年12月03日.01:25:16 |
| SpamBayes Score |
4.822751e-06 |
| Marked as misclassified |
No |
| Message-id |
<1291339519.59.0.737922107849.issue10611@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|
History
|
|---|
| 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 |
|