Daniel Urban <urban.dani...@gmail.com> added the comment: 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? ---------- nosy: +durban _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11759> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com