Message138957
| Author |
r.david.murray |
| Recipients |
benjamin.peterson, eric.smith, francismb, petri.lehtinen, r.david.murray, skrah |
| Date |
2011年06月24日.16:07:21 |
| SpamBayes Score |
2.0891923e-05 |
| Marked as misclassified |
No |
| Message-id |
<1308931642.19.0.759955232102.issue10206@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I think that self.assertRegex(err.decode('ascii', 'ignore'), 'SyntaxError') would be fine. We are extremely unlikely to change the string representation of the name of SyntaxError or omit it from the error message, so I think this is a reliable test. If you really want to be paranoid, you could use SyntaxError.__name__ as the argument to assertRegex, but there are a number of other places in the test suite where we hardcode the exception names, so I don't think it is necessary. |
|