summaryrefslogtreecommitdiff
path: root/Lib/tkinter/test/test_ttk/test_widgets.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-15 17:56:08 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-15 17:56:08 +0200
commit4c72366e6f8d1f306c038c9fd969b64ed8d85faa (patch)
treec34e374cb700a6bf34a9621e61fa37431413fe77 /Lib/tkinter/test/test_ttk/test_widgets.py
parent8fa78f17d333cc7e3eb1bbc92aed9dd657db39b5 (diff)
downloadcpython-4c72366e6f8d1f306c038c9fd969b64ed8d85faa.tar.gz
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 f5c0f17dd0..c2231dc324 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']))