summaryrefslogtreecommitdiffstatshomepage
path: root/tests/float/int_big_float.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-10-01 22:48:48 +0100
committerDamien George <damien.p.george@gmail.com>2015-10-01 22:48:48 +0100
commite5635f4ab3d0fd00dd3951865fea82003205dae1 (patch)
tree9a1de95044325db1d35f071148358ca87c0ba239 /tests/float/int_big_float.py
parent2065373f67b126edfc3e0f2519aaad0956902c14 (diff)
downloadmicropython-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.py5
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")