Message132923
What about this:
>>> class MyTestCase(TestCase):
... def test_foo(self):
... with self.assertRaises(SyntaxError) as cm:
... compile('asdf jkl', 'file.py', 'eval')
... self.assertEqual('file.py', cm.exception.filename)
This isn't good enough? |
|
Date |
User |
Action |
Args |
2011-04-04 09:27:10 | daniel.urban | set | recipients:
+ daniel.urban, techtonik |
2011-04-04 09:27:10 | daniel.urban | set | messageid: <1301909230.08.0.5199735245.issue11759@psf.upfronthosting.co.za> |
2011-04-04 09:27:08 | daniel.urban | link | issue11759 messages |
2011-04-04 09:27:08 | daniel.urban | create | |
|