diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-06 19:49:07 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-06 19:49:07 (GMT) |
commit | 87a2803eb4ba4592c7e497e8e06742690a6767ab (patch) | |
tree | a336d9de378d0a24c8472d2c157f546410e01ae8 /Lib/tkinter/test | |
parent | 1ba003f3e1b1f9a8f466cdc36ac7ceae6b953589 (diff) | |
parent | 8f0a1d0f285536c9262d30b20f5f1becfe103309 (diff) | |
download | cpython-87a2803eb4ba4592c7e497e8e06742690a6767ab.zip cpython-87a2803eb4ba4592c7e497e8e06742690a6767ab.tar.gz cpython-87a2803eb4ba4592c7e497e8e06742690a6767ab.tar.bz2 |
Issue #22226: Added private function _splitdict() in the Tkinter module.
First letter no longer is stripped from the "status" key in
the result of Treeview.heading().
Diffstat (limited to 'Lib/tkinter/test')
-rw-r--r-- | Lib/tkinter/test/test_ttk/test_functions.py | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/Lib/tkinter/test/test_ttk/test_functions.py b/Lib/tkinter/test/test_ttk/test_functions.py index 41e6311..c9dcf97 100644 --- a/Lib/tkinter/test/test_ttk/test_functions.py +++ b/Lib/tkinter/test/test_ttk/test_functions.py @@ -324,26 +324,13 @@ class InternalFunctionsTest(unittest.TestCase): "-opt {3 2m}") - def test_dict_from_tcltuple(self): - fakettuple = ('-a', '{1 2 3}', '-something', 'foo') - - self.assertEqual(ttk._dict_from_tcltuple(fakettuple, False), - {'-a': '{1 2 3}', '-something': 'foo'}) - - self.assertEqual(ttk._dict_from_tcltuple(fakettuple), - {'a': '{1 2 3}', 'something': 'foo'}) - - # passing a tuple with a single item should return an empty dict, - # since it tries to break the tuple by pairs. - self.assertFalse(ttk._dict_from_tcltuple(('single', ))) - - sspec = MockStateSpec('a', 'b') - self.assertEqual(ttk._dict_from_tcltuple(('-a', (sspec, 'val'))), - {'a': [('a', 'b', 'val')]}) - - self.assertEqual(ttk._dict_from_tcltuple((MockTclObj('-padding'), - [MockTclObj('1'), 2, MockTclObj('3m')])), - {'padding': [1, 2, '3m']}) + def test_tclobj_to_py(self): + self.assertEqual( + ttk._tclobj_to_py((MockStateSpec('a', 'b'), 'val')), + [('a', 'b', 'val')]) + self.assertEqual( + ttk._tclobj_to_py([MockTclObj('1'), 2, MockTclObj('3m')]), + [1, 2, '3m']) def test_list_from_statespec(self): |