summaryrefslogtreecommitdiff
path: root/Lib/test/test_tcl.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r--Lib/test/test_tcl.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index e7a60db777..6e5ef097c8 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -43,8 +43,14 @@ def get_tk_patchlevel():
class TkinterTest(unittest.TestCase):
def testFlattenLen(self):
- # flatten(<object with no length>)
+ # Object without length.
self.assertRaises(TypeError, _tkinter._flatten, True)
+ # Object with length, but not sequence.
+ self.assertRaises(TypeError, _tkinter._flatten, {})
+ # Sequence or set, but not tuple or list.
+ # (issue44608: there were leaks in the following cases)
+ self.assertRaises(TypeError, _tkinter._flatten, 'string')
+ self.assertRaises(TypeError, _tkinter._flatten, {'set'})
class TclTest(unittest.TestCase):