mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-46996: Remove support of Tcl/Tk < 8.5.12 (GH-31839)
This commit is contained in:
parent
7aeb06f78e
commit
c2e3c06139
10 changed files with 90 additions and 216 deletions
|
@ -7,7 +7,7 @@ import sys
|
|||
from test.test_ttk_textonly import MockTclObj
|
||||
from tkinter.test.support import (AbstractTkTest, tcl_version, get_tk_patchlevel,
|
||||
simulate_mouse_click, AbstractDefaultRootTest)
|
||||
from tkinter.test.widget_tests import (add_standard_options, noconv,
|
||||
from tkinter.test.widget_tests import (add_standard_options,
|
||||
AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests,
|
||||
setUpModule)
|
||||
|
||||
|
@ -110,7 +110,7 @@ class WidgetTest(AbstractTkTest, unittest.TestCase):
|
|||
|
||||
|
||||
class AbstractToplevelTest(AbstractWidgetTest, PixelSizeTests):
|
||||
_conv_pixels = noconv
|
||||
_conv_pixels = False
|
||||
|
||||
|
||||
@add_standard_options(StandardTtkOptionsTests)
|
||||
|
@ -193,7 +193,7 @@ class LabelTest(AbstractLabelTest, unittest.TestCase):
|
|||
'takefocus', 'text', 'textvariable',
|
||||
'underline', 'width', 'wraplength',
|
||||
)
|
||||
_conv_pixels = noconv
|
||||
_conv_pixels = False
|
||||
|
||||
def create(self, **kwargs):
|
||||
return ttk.Label(self.root, **kwargs)
|
||||
|
@ -473,8 +473,7 @@ class ComboboxTest(EntryTest, unittest.TestCase):
|
|||
self.assertEqual(self.combo.get(), getval)
|
||||
self.assertEqual(self.combo.current(), currval)
|
||||
|
||||
self.assertEqual(self.combo['values'],
|
||||
() if tcl_version < (8, 5) else '')
|
||||
self.assertEqual(self.combo['values'], '')
|
||||
check_get_current('', -1)
|
||||
|
||||
self.checkParam(self.combo, 'values', 'mon tue wed thur',
|
||||
|
@ -741,7 +740,7 @@ class ScaleTest(AbstractWidgetTest, unittest.TestCase):
|
|||
'class', 'command', 'cursor', 'from', 'length',
|
||||
'orient', 'style', 'takefocus', 'to', 'value', 'variable',
|
||||
)
|
||||
_conv_pixels = noconv
|
||||
_conv_pixels = False
|
||||
default_orient = 'horizontal'
|
||||
|
||||
def setUp(self):
|
||||
|
@ -848,7 +847,7 @@ class ProgressbarTest(AbstractWidgetTest, unittest.TestCase):
|
|||
'mode', 'maximum', 'phase',
|
||||
'style', 'takefocus', 'value', 'variable',
|
||||
)
|
||||
_conv_pixels = noconv
|
||||
_conv_pixels = False
|
||||
default_orient = 'horizontal'
|
||||
|
||||
def create(self, **kwargs):
|
||||
|
@ -1231,8 +1230,7 @@ class SpinboxTest(EntryTest, unittest.TestCase):
|
|||
self.assertEqual(self.spin.get(), '1')
|
||||
|
||||
def test_configure_values(self):
|
||||
self.assertEqual(self.spin['values'],
|
||||
() if tcl_version < (8, 5) else '')
|
||||
self.assertEqual(self.spin['values'], '')
|
||||
self.checkParam(self.spin, 'values', 'mon tue wed thur',
|
||||
expected=('mon', 'tue', 'wed', 'thur'))
|
||||
self.checkParam(self.spin, 'values', ('mon', 'tue', 'wed', 'thur'))
|
||||
|
@ -1316,7 +1314,7 @@ class TreeviewTest(AbstractWidgetTest, unittest.TestCase):
|
|||
def test_configure_height(self):
|
||||
widget = self.create()
|
||||
self.checkPixelsParam(widget, 'height', 100, -100, 0, '3c', conv=False)
|
||||
self.checkPixelsParam(widget, 'height', 101.2, 102.6, conv=noconv)
|
||||
self.checkPixelsParam(widget, 'height', 101.2, 102.6, conv=False)
|
||||
|
||||
def test_configure_selectmode(self):
|
||||
widget = self.create()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue