diff options
author | Damien George <damien.p.george@gmail.com> | 2018-02-14 16:50:20 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-02-14 16:50:20 +1100 |
commit | 04c55f582866b700c5c39158ee76a1b970b71375 (patch) | |
tree | 2ba6bef5a0dc00f671d9c1959eb214890d5a80a2 /tests/basics/op_error_intbig.py | |
parent | 6031957473a15f62ecbe59b9d27e58e9d06a4d8a (diff) | |
download | micropython-04c55f582866b700c5c39158ee76a1b970b71375.tar.gz micropython-04c55f582866b700c5c39158ee76a1b970b71375.zip |
tests: Rewrite some tests so they can run without needing eval/exec.
For builds without the compiler enabled (and hence without eval/exec) it is
useful to still be able to run as many tests as possible.
Diffstat (limited to 'tests/basics/op_error_intbig.py')
-rw-r--r-- | tests/basics/op_error_intbig.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/basics/op_error_intbig.py b/tests/basics/op_error_intbig.py index 432c05a9fe..7def75b0c6 100644 --- a/tests/basics/op_error_intbig.py +++ b/tests/basics/op_error_intbig.py @@ -10,4 +10,7 @@ def test_exc(code, exc): print("wrong exception") # object with buffer protocol needed on rhs -test_exc("(1 << 70) in 1", TypeError) +try: + (1 << 70) in 1 +except TypeError: + print('TypeError') |