Skip to content

Commit 6d18d2f

Browse files
authored
Fix test failures due to return type being tcl obj not tuple
1 parent 2601ddf commit 6d18d2f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Lib/test/test_tkinter/test_text.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,16 @@ def test_nolinestop(self):
109109

110110
def test_all(self):
111111
result = self.text.search('test', '1.0', 'end', all=True)
112-
self.assertIsInstance(result, tuple)
113-
self.assertGreaterEqual(len(result), 2)
114-
self.assertTrue(all(str(index) for index in result)) # ensure valid index strings
115-
112+
self.assertIsInstance(result, str)
113+
indices = result.split()
114+
self.assertGreaterEqual(len(indices), 2)
115+
self.assertTrue(all(isinstance(i, str) for i in indices))
116+
116117
def test_overlap(self):
117118
result = self.text.search('test', '1.0', 'end', all=True, overlap=True)
118-
self.assertIsInstance(result, tuple)
119-
self.assertGreaterEqual(len(result), 2)
119+
indices = result.split()
120+
self.assertGreaterEqual(len(indices), 2)
121+
self.assertTrue('1.10' in indices)
120122

121123
def test_strictlimits(self):
122124
result = self.text.search('test', '1.0', '1.20', strictlimits=True)

0 commit comments

Comments
 (0)