test_debug in test_tkinter/test_text no longer fails when wantobjects is false.

This commit is contained in:
Serhiy Storchaka 2013-12-25 17:35:11 +02:00
parent 5542b15d25
commit 0356ff0493
1 changed files with 3 additions and 2 deletions

View File

@ -16,12 +16,13 @@ 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)
self.assertEqual(text.debug(), 0 if wantobjects else '0')
text.debug(1)
self.assertEqual(text.debug(), 1)
self.assertEqual(text.debug(), 1 if wantobjects else '1')
finally:
text.debug(olddebug)
self.assertEqual(text.debug(), olddebug)