SF bug #444510: int() should guarantee truncation.
It's guaranteed now, assuming the platform modf() works correctly.
diff --git a/Lib/test/test_b1.py b/Lib/test/test_b1.py
index e2cc49b..bddd157 100644
--- a/Lib/test/test_b1.py
+++ b/Lib/test/test_b1.py
@@ -366,6 +366,19 @@
pass
else:
raise TestFailed, "int(%s)" % `s[1:]` + " should raise ValueError"
+try:
+ int(1e100)
+except OverflowError:
+ pass
+else:
+ raise TestFailed("int(1e100) expected OverflowError")
+try:
+ int(-1e100)
+except OverflowError:
+ pass
+else:
+ raise TestFailed("int(-1e100) expected OverflowError")
+
# SF bug 434186: 0x80000000/2 != 0x80000000>>1.
# Worked by accident in Windows release build, but failed in debug build.