Message76492
Patch to allow unit tests to test for exceptions through a 'with'
statement. Resulting (failing) test would look like this:
import unittest
class T(unittest.TestCase):
def runTest(self):
with self.assertRaises(KeyError):
raise ValueError
This saves having to put exception raising tests into a try/except
block, which is cool. And by cool I mean totally sweet. |
|
Date |
User |
Action |
Args |
2008-11-27 09:50:00 | dleonard0 | set | recipients:
+ dleonard0 |
2008-11-27 09:50:00 | dleonard0 | set | messageid: <1227779400.76.0.0502987149884.issue4444@psf.upfronthosting.co.za> |
2008-11-27 09:49:59 | dleonard0 | link | issue4444 messages |
2008-11-27 09:49:58 | dleonard0 | create | |
|