Author: Armin Rigo <ar...@tunes.org> Branch: py3.5 Changeset: r89757:7b730843efb4 Date: 2017-01-25 10:44 +0100 http://bitbucket.org/pypy/pypy/changeset/7b730843efb4/
Log: Allow both CPython and PyPy error messages diff --git a/lib-python/3/test/test_fstring.py b/lib-python/3/test/test_fstring.py --- a/lib-python/3/test/test_fstring.py +++ b/lib-python/3/test/test_fstring.py @@ -150,7 +150,7 @@ # Inside of strings, don't interpret doubled brackets. self.assertEqual(f'{"{{}}"}', '{{}}') - self.assertAllRaise(TypeError, 'unhashable type', + self.assertAllRaise(TypeError, 'unhashable', ["f'{ {{}} }'", # dict in a set ]) @@ -413,7 +413,7 @@ # lambda doesn't work without parens, because the colon # makes the parser think it's a format_spec - self.assertAllRaise(SyntaxError, 'unexpected EOF while parsing', + self.assertAllRaise(SyntaxError, 'unexpected EOF while parsing|invalid syntax', ["f'{lambda x:x}'", ]) @@ -748,11 +748,11 @@ def test_errors(self): # see issue 26287 - self.assertAllRaise(TypeError, 'unsupported', + self.assertAllRaise(TypeError, 'unsupported|non-empty format string', [r"f'{(lambda: 0):x}'", r"f'{(0,):x}'", ]) - self.assertAllRaise(ValueError, 'Unknown format code', + self.assertAllRaise(ValueError, 'Unknown format code|unknown presentation', [r"f'{1000:j}'", r"f'{1000:j}'", ]) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit