circuitpython/tests/basics/try_as_var.py
Damien George 8f0147cf00 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.
2020-03-31 17:27:10 -05:00

11 lines
188 B
Python

try:
raise ValueError(534)
except ValueError as e:
print(type(e), e.args)
# Var bound in except block is automatically deleted
try:
e
except NameError:
print("NameError")