diff options
author | Damien George <damien.p.george@gmail.com> | 2015-10-01 22:48:48 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-10-01 22:48:48 +0100 |
commit | e5635f4ab3d0fd00dd3951865fea82003205dae1 (patch) | |
tree | 9a1de95044325db1d35f071148358ca87c0ba239 /tests/float/int_big_float.py | |
parent | 2065373f67b126edfc3e0f2519aaad0956902c14 (diff) | |
download | micropython-e5635f4ab3d0fd00dd3951865fea82003205dae1.tar.gz micropython-e5635f4ab3d0fd00dd3951865fea82003205dae1.zip |
py: Catch all cases of integer (big and small) division by zero.
Diffstat (limited to 'tests/float/int_big_float.py')
-rw-r--r-- | tests/float/int_big_float.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/float/int_big_float.py b/tests/float/int_big_float.py index 2c404189cb..b1a26ca73d 100644 --- a/tests/float/int_big_float.py +++ b/tests/float/int_big_float.py @@ -17,3 +17,8 @@ print("%.5g" % (i / 1.2)) # this should delegate to complex print("%.5g" % (i * 1.2j).imag) + +try: + i / 0 +except ZeroDivisionError: + print("ZeroDivisionError") |