summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-02-01 16:49:21 (GMT)
committerGitHub <noreply@github.com>2018-02-01 16:49:21 (GMT)
commit97f1ca167385bafd9be5d226f61c33412fc081bf (patch)
tree49e0230e7e93865944f2ed9074d8e0d0f2a433b5 /Lib/tkinter/test
parent12e7cd8a51956a5ce373aac692ae6366c5f86584 (diff)
downloadcpython-97f1ca167385bafd9be5d226f61c33412fc081bf.zip
cpython-97f1ca167385bafd9be5d226f61c33412fc081bf.tar.gz
cpython-97f1ca167385bafd9be5d226f61c33412fc081bf.tar.bz2
[3.8] bpo-31508: Remove support of arguments in tkinter.ttk.Treeview.selection. (GH-3651)
It was deprecated in 3.6.
Diffstat (limited to 'Lib/tkinter/test')
-rw-r--r--Lib/tkinter/test/test_ttk/test_widgets.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/Lib/tkinter/test/test_ttk/test_widgets.py b/Lib/tkinter/test/test_ttk/test_widgets.py
index ab0db28..08f5fc3 100644
--- a/Lib/tkinter/test/test_ttk/test_widgets.py
+++ b/Lib/tkinter/test/test_ttk/test_widgets.py
@@ -1556,27 +1556,6 @@ class TreeviewTest(AbstractWidgetTest, unittest.TestCase):
self.tv.selection_toggle((c1, c3))
self.assertEqual(self.tv.selection(), (c3, item2))
- if sys.version_info >= (3, 8):
- import warnings
- warnings.warn(
- 'Deprecated API of Treeview.selection() should be removed')
- self.tv.selection_set()
- self.assertEqual(self.tv.selection(), ())
- with self.assertWarns(DeprecationWarning):
- self.tv.selection('set', (c1, item2))
- self.assertEqual(self.tv.selection(), (c1, item2))
- with self.assertWarns(DeprecationWarning):
- self.tv.selection('add', (c1, item1))
- self.assertEqual(self.tv.selection(), (item1, c1, item2))
- with self.assertWarns(DeprecationWarning):
- self.tv.selection('remove', (item1, c3))
- self.assertEqual(self.tv.selection(), (c1, item2))
- with self.assertWarns(DeprecationWarning):
- self.tv.selection('toggle', (c1, c3))
- self.assertEqual(self.tv.selection(), (c3, item2))
- with self.assertWarns(DeprecationWarning):
- selection = self.tv.selection(None)
- self.assertEqual(selection, (c3, item2))
def test_set(self):
self.tv['columns'] = ['A', 'B']