summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-10-19 09:57:18 (GMT)
committerGitHub <noreply@github.com>2022-10-19 09:57:18 (GMT)
commiteee8b99dc3e461e6a0664c8bf449887eb7a1d4c3 (patch)
tree09dbf7d9b0dd82cb4e9bbeb8c173f0bd4a69792d /Lib/tkinter/test
parentd0ed05c0189d85f04164ea51c7a36ea6bbb02764 (diff)
downloadcpython-eee8b99dc3e461e6a0664c8bf449887eb7a1d4c3.zip
cpython-eee8b99dc3e461e6a0664c8bf449887eb7a1d4c3.tar.gz
cpython-eee8b99dc3e461e6a0664c8bf449887eb7a1d4c3.tar.bz2
gh-97928: Fix handling options starting with "-" in tkinter.Text.count() (GH-98436)
Previously they were silently ignored. Now they are errors. (cherry picked from commit e4ec8de6fa6f0a07e64f6a3e3f894926b4b0652d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/tkinter/test')
-rw-r--r--Lib/tkinter/test/test_tkinter/test_text.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_text.py b/Lib/tkinter/test/test_tkinter/test_text.py
index f0b101b..ea55758 100644
--- a/Lib/tkinter/test/test_tkinter/test_text.py
+++ b/Lib/tkinter/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