Issue #6157: Fixed tkinter.Text.debug(). Original patch by Guilherme Polo.

This commit is contained in:
Serhiy Storchaka 2013-11-03 14:29:35 +02:00
parent 2849e0dfb7
commit 0b9e815d8d
4 changed files with 29 additions and 2 deletions

View file

@ -14,6 +14,17 @@ class TextTest(unittest.TestCase):
def tearDown(self):
self.text.destroy()
def test_debug(self):
text = self.text
olddebug = text.debug()
try:
text.debug(0)
self.assertEqual(text.debug(), 0)
text.debug(1)
self.assertEqual(text.debug(), 1)
finally:
text.debug(olddebug)
self.assertEqual(text.debug(), olddebug)
def test_search(self):
text = self.text