summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test/test_ttk
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-09-06 19:47:58 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-09-06 19:47:58 (GMT)
commit8f0a1d0f285536c9262d30b20f5f1becfe103309 (patch)
tree53491d67a7170e85b5d9f2c22f25e00ed5834162 /Lib/tkinter/test/test_ttk
parentc70386ec16c373dc3c2b2778f12f1772985bd304 (diff)
downloadcpython-8f0a1d0f285536c9262d30b20f5f1becfe103309.zip
cpython-8f0a1d0f285536c9262d30b20f5f1becfe103309.tar.gz
cpython-8f0a1d0f285536c9262d30b20f5f1becfe103309.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/test_ttk')
-rw-r--r--Lib/tkinter/test/test_ttk/test_functions.py27
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):