Skip to content

Commit fb724c1

Browse files
committed
Add a test for newint(newstr(u'123')), which worked in v0.12.4 but is failing now ...
1 parent 9eb2d11 commit fb724c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

future/tests/test_int.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,12 @@ class CustomByteArray(bytearray): pass
299299
self.assertEqual(int(x), 100, msg=msg)
300300
self.assertEqual(int(x, 2), 4, msg=msg)
301301

302+
def test_newint_of_newstr(self):
303+
a = str(u'123')
304+
b = int(a)
305+
self.assertEqual(b, 123)
306+
self.assertTrue(isinstance(b, int))
307+
302308
def test_string_float(self):
303309
self.assertRaises(ValueError, int, '1.2')
304310

0 commit comments

Comments
 (0)