diff options
author | Damien George <damien.p.george@gmail.com> | 2018-08-17 15:46:04 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-08-17 15:46:04 +1000 |
commit | 8979ce167101dec95c4cf994b3652debd6c8da6c (patch) | |
tree | 74c4480a58f5c45f7ede2c638c0367dc80e6bc76 /tests/basics/try_as_var.py | |
parent | 0988b14cd6d5fdbcc3fe3e65c6bdb6af1e906597 (diff) | |
download | micropython-8979ce167101dec95c4cf994b3652debd6c8da6c.tar.gz micropython-8979ce167101dec95c4cf994b3652debd6c8da6c.zip |
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.
Diffstat (limited to 'tests/basics/try_as_var.py')
-rw-r--r-- | tests/basics/try_as_var.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/basics/try_as_var.py b/tests/basics/try_as_var.py index 0a92f1caee..4f02f9c106 100644 --- a/tests/basics/try_as_var.py +++ b/tests/basics/try_as_var.py @@ -1,7 +1,7 @@ try: raise ValueError(534) except ValueError as e: - print(repr(e)) + print(type(e), e.args) # Var bound in except block is automatically deleted try: |