Skip to content

Commit

Permalink
pythongh-104411: Update test_getint for Tcl 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstphrchvz authored May 12, 2023
1 parent ac66cc1 commit 9f8b855
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib/test/test_tcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ def test_getint(self):
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)
self.assertEqual(tcl.getint((' %#o ' % i).replace('o', '')),
i if tcl_version < (9, 0) else
int(('%#o' % i).replace('o', '')))
self.assertEqual(tcl.getint(' %#x ' % i), i)
self.assertEqual(tcl.getint(42), 42)
self.assertRaises(TypeError, tcl.getint)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update test_getint for changes to octal integer parsing in Tcl 9.0.

0 comments on commit 9f8b855

Please sign in to comment.