mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
tkinter.Text.debug() now always returns 0/1.
Fixed a regression inroduced in issue #6157.
This commit is contained in:
parent
02d5db2777
commit
2f26c224d7
2 changed files with 3 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue