summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tkinter')
-rw-r--r--Lib/tkinter/__init__.py2
-rw-r--r--Lib/tkinter/test/test_tkinter/test_text.py5
2 files changed, 3 insertions, 4 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index 7aa37da..d7352ea 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -2963,7 +2963,7 @@ class Text(Widget, XView, YView):
"""Turn on the internal consistency checks of the B-Tree inside the text
widget according to BOOLEAN."""
if boolean is None:
- return self.tk.call(self._w, 'debug')
+ return self.tk.getboolean(self.tk.call(self._w, 'debug'))
self.tk.call(self._w, 'debug', boolean)
def delete(self, index1, index2=None):
"""Delete the characters between INDEX1 and INDEX2 (not included)."""
diff --git a/Lib/tkinter/test/test_tkinter/test_text.py b/Lib/tkinter/test/test_tkinter/test_text.py
index db8ae6c..4c3fa04 100644
--- a/Lib/tkinter/test/test_tkinter/test_text.py
+++ b/Lib/tkinter/test/test_tkinter/test_text.py
@@ -16,13 +16,12 @@ class TextTest(unittest.TestCase):
def test_debug(self):
text = self.text
- wantobjects = self.root.wantobjects()
olddebug = text.debug()
try:
text.debug(0)
- self.assertEqual(text.debug(), 0 if wantobjects else '0')
+ self.assertEqual(text.debug(), 0)
text.debug(1)
- self.assertEqual(text.debug(), 1 if wantobjects else '1')
+ self.assertEqual(text.debug(), 1)
finally:
text.debug(olddebug)
self.assertEqual(text.debug(), olddebug)