mirror of https://github.com/python/cpython
gh-104411: Update test_getint for Tcl 9.0 (GH-104412)
This commit is contained in:
parent
8ddf0dd264
commit
2c49c759e8
|
@ -142,7 +142,10 @@ class TclTest(unittest.TestCase):
|
|||
for i in self.get_integers():
|
||||
self.assertEqual(tcl.getint(' %d ' % i), i)
|
||||
self.assertEqual(tcl.getint(' %#o ' % i), i)
|
||||
self.assertEqual(tcl.getint((' %#o ' % i).replace('o', '')), i)
|
||||
# Numbers starting with 0 are parsed as decimal in Tcl 9.0
|
||||
# and as octal in older versions.
|
||||
self.assertEqual(tcl.getint((' %#o ' % i).replace('o', '')),
|
||||
i if tcl_version < (9, 0) else int('%o' % i))
|
||||
self.assertEqual(tcl.getint(' %#x ' % i), i)
|
||||
self.assertEqual(tcl.getint(42), 42)
|
||||
self.assertRaises(TypeError, tcl.getint)
|
||||
|
|
Loading…
Reference in New Issue