summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-01-30 02:24:39 +0000
committerBenjamin Peterson <benjamin@python.org>2009-01-30 02:24:39 +0000
commitb3619be995f9c4080dc38f2a8532bdf44503d840 (patch)
tree6af4178f32f1b9d92f15e853e1c69caa5cde22d7 /Lib
parent4a69410e9f228cd05c0ca8fe653ffcae0d874b85 (diff)
downloadcpython-git-b3619be995f9c4080dc38f2a8532bdf44503d840.tar.gz
make _tkinter._flatten check the result of PySequence_Size for errors #3880
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_tcl.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index fa170ef58d..26e294ce13 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -2,10 +2,19 @@
import unittest
import os
+import _tkinter
from test import test_support
from Tkinter import Tcl
from _tkinter import TclError
+
+class TkinterTest(unittest.TestCase):
+
+ def testFlattenLen(self):
+ # flatten(<object with no length>)
+ self.assertRaises(TypeError, _tkinter._flatten, True)
+
+
class TclTest(unittest.TestCase):
def setUp(self):
@@ -151,7 +160,7 @@ class TclTest(unittest.TestCase):
os.environ['DISPLAY'] = old_display
def test_main():
- test_support.run_unittest(TclTest)
+ test_support.run_unittest(TclTest, TkinterTest)
if __name__ == "__main__":
test_main()