diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-10-19 09:30:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 09:30:14 (GMT) |
commit | e4ec8de6fa6f0a07e64f6a3e3f894926b4b0652d (patch) | |
tree | 30cd723475774de40d91035af10a14e720b712b6 /Lib/test/test_tkinter | |
parent | 1b684c8f5f738b56f859e5c87b7280610b90399f (diff) | |
download | cpython-e4ec8de6fa6f0a07e64f6a3e3f894926b4b0652d.zip cpython-e4ec8de6fa6f0a07e64f6a3e3f894926b4b0652d.tar.gz cpython-e4ec8de6fa6f0a07e64f6a3e3f894926b4b0652d.tar.bz2 |
gh-97928: Fix handling options starting with "-" in tkinter.Text.count() (GH-98436)
Previously they were silently ignored. Now they are errors.
Diffstat (limited to 'Lib/test/test_tkinter')
-rw-r--r-- | Lib/test/test_tkinter/test_text.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_tkinter/test_text.py b/Lib/test/test_tkinter/test_text.py index b8dfde6..328e425 100644 --- a/Lib/test/test_tkinter/test_text.py +++ b/Lib/test/test_tkinter/test_text.py @@ -76,9 +76,7 @@ class TextTest(AbstractTkTest, unittest.TestCase): self.assertEqual(text.count('1.0', 'end'), (124,) # 'indices' by default if self.wantobjects else ('124',)) self.assertRaises(tkinter.TclError, text.count, '1.0', 'end', 'spam') - # '-lines' is ignored, 'indices' is used by default - self.assertEqual(text.count('1.0', 'end', '-lines'), (124,) - if self.wantobjects else ('124',)) + self.assertRaises(tkinter.TclError, text.count, '1.0', 'end', '-lines') self.assertIsInstance(text.count('1.3', '1.5', 'ypixels'), tuple) self.assertIsInstance(text.count('1.3', '1.5', 'update', 'ypixels'), int |