Fix tests for float.__round__
Added type checkings for float.__round__ tests and fixed tests when
ndigits is zero.
@@ -151,12 +151,18 @@ assert float(1.2) == 1.2
assert math.trunc(1.2) == 1
assert_raises(OverflowError, float('inf').__trunc__)
assert_raises(ValueError, float('nan').__trunc__)
-assert 0.5.__round__() == 0.0
-assert 1.5.__round__() == 2.0
+assert isinstance(0.5.__round__(), int)
+assert isinstance(1.5.__round__(), int)
+assert 0.5.__round__() == 0
+assert 1.5.__round__() == 2
+assert isinstance(0.5.__round__(0), float)
+assert isinstance(1.5.__round__(0), float)
assert 0.5.__round__(0) == 0.0
assert 1.5.__round__(0) == 2.0
-assert 0.5.__round__(None) == 0.0
-assert 1.5.__round__(None) == 2.0
+assert isinstance(0.5.__round__(None), int)
+assert isinstance(1.5.__round__(None), int)
+assert 0.5.__round__(None) == 0
+assert 1.5.__round__(None) == 2
assert_raises(OverflowError, float('inf').__round__)
assert_raises(ValueError, float('nan').__round__)
