[issue10206] python program starting with unmatched quote spews spaces to stdout
R. David Murray
report at bugs.python.org
Fri Jun 24 18:07:22 CEST 2011
R. David Murray <rdmurray at bitdance.com> added the comment:
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.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list