mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
It's ok for __hex__ or __oct__ to return unicode.
Don't insist that float('1'*10000) raises an exception.
This commit is contained in:
parent
a45ea5828e
commit
e1083734ec
2 changed files with 3 additions and 4 deletions
|
|
@ -608,8 +608,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
if have_unicode:
|
||||
self.assertEqual(float(str(" 3.14 ")), 3.14)
|
||||
self.assertEqual(float(str(b" \u0663.\u0661\u0664 ",'raw-unicode-escape')), 3.14)
|
||||
# Implementation limitation in PyFloat_FromString()
|
||||
self.assertRaises(ValueError, float, str("1"*10000))
|
||||
self.assertEqual(float("1"*10000), 1e10000) # Inf on both sides
|
||||
|
||||
@run_with_locale('LC_NUMERIC', 'fr_FR', 'de_DE')
|
||||
def test_float_with_comma(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue