tests: Modify tests that print repr of an exception with 1 arg.

In Python 3.7 the behaviour of repr() of an exception with one argument
changed: it no longer prints a trailing comma in the argument list.  See
https://bugs.python.org/issue30399

This patch modifies tests that rely on this behaviour to not rely on it.
And the python34.py test is updated to include a test for this behaviour
with a .exp file.
This commit is contained in:
Damien George
2018-08-17 15:46:04 +10:00
parent 0988b14cd6
commit 8979ce1671
8 changed files with 12 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ print({1:1} == {2:1})
try:
{}[0]
except KeyError as er:
print('KeyError', er, repr(er), er.args)
print('KeyError', er, er.args)
# unsupported unary op
try: