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:24 +02:00
parent cc4290bf91
commit a1de906330
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)