From 214179b430ebc1101e28b19248b6166f5e511e6b Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 25 Mar 2015 23:10:09 +0000 Subject: tests: Add tests for SyntaxError, TypeError, and other missing things. This is intended to improve coverage of the test suite. --- tests/float/float1.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/float/float1.py') diff --git a/tests/float/float1.py b/tests/float/float1.py index 7b5887ff0..9e4bb85cd 100644 --- a/tests/float/float1.py +++ b/tests/float/float1.py @@ -20,6 +20,12 @@ try: except ZeroDivisionError: print("ZeroDivisionError") +# can't convert list to float +try: + float([]) +except TypeError: + print("TypeError") + # test constant float with more than 255 chars x = 1.84728699436059052516398251149631771898472869943605905251639825114963177189847286994360590525163982511496317718984728699436059052516398251149631771898472869943605905251639825114963177189847286994360590525163982511496317718984728699436059052516398251149631771898472869943605905251639825114963177189 print("%.5f" % x) -- cgit v1.2.3