diff options
Diffstat (limited to 'tests/float/builtin_float_round.py')
-rw-r--r-- | tests/float/builtin_float_round.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/float/builtin_float_round.py b/tests/float/builtin_float_round.py index de72514db7..63cb39aa35 100644 --- a/tests/float/builtin_float_round.py +++ b/tests/float/builtin_float_round.py @@ -15,3 +15,10 @@ for i in range(11): # test second arg for i in range(-1, 3): print(round(1.47, i)) + +# test inf and nan +for val in (float('inf'), float('nan')): + try: + round(val) + except (ValueError, OverflowError) as e: + print(type(e)) |