summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test/test_ttk/test_widgets.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-15 15:56:08 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-15 15:56:08 (GMT)
commitb1396523660ac74435976fcaa2d490f3124c6add (patch)
treeb4b656fb2591d32347a75592cedeba9b392cbd1e /Lib/tkinter/test/test_ttk/test_widgets.py
parent44763dd7a709415b665090b5c5b0d3affeeef651 (diff)
downloadcpython-b1396523660ac74435976fcaa2d490f3124c6add.zip
cpython-b1396523660ac74435976fcaa2d490f3124c6add.tar.gz
cpython-b1396523660ac74435976fcaa2d490f3124c6add.tar.bz2
Issue #15861: tkinter now correctly works with lists and tuples containing
strings with whitespaces, backslashes or unbalanced braces.
Diffstat (limited to 'Lib/tkinter/test/test_ttk/test_widgets.py')
-rw-r--r--Lib/tkinter/test/test_ttk/test_widgets.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/tkinter/test/test_ttk/test_widgets.py b/Lib/tkinter/test/test_ttk/test_widgets.py
index f5c0f17..c2231dc 100644
--- a/Lib/tkinter/test/test_ttk/test_widgets.py
+++ b/Lib/tkinter/test/test_ttk/test_widgets.py
@@ -189,6 +189,14 @@ class ComboboxTest(unittest.TestCase):
self.combo.configure(values=[1, '', 2])
self.assertEqual(self.combo['values'], ('1', '', '2'))
+ # testing values with spaces
+ self.combo['values'] = ['a b', 'a\tb', 'a\nb']
+ self.assertEqual(self.combo['values'], ('a b', 'a\tb', 'a\nb'))
+
+ # testing values with special characters
+ self.combo['values'] = [r'a\tb', '"a"', '} {']
+ self.assertEqual(self.combo['values'], (r'a\tb', '"a"', '} {'))
+
# out of range
self.assertRaises(tkinter.TclError, self.combo.current,
len(self.combo['values']))