mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-124378: Update test_ttk for Tcl/Tk 8.6.15 (GH-124542)
Co-authored-by: Marc Culler <culler@users.noreply.github.com>
This commit is contained in:
parent
d6954b6421
commit
fb6bd31cb7
2 changed files with 16 additions and 2 deletions
|
@ -963,8 +963,7 @@ class ScrollbarTest(AbstractWidgetTest, unittest.TestCase):
|
||||||
return ttk.Scrollbar(self.root, **kwargs)
|
return ttk.Scrollbar(self.root, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@add_standard_options(PixelSizeTests if tk_version >= (8, 7) else IntegerSizeTests,
|
@add_standard_options(StandardTtkOptionsTests)
|
||||||
StandardTtkOptionsTests)
|
|
||||||
class NotebookTest(AbstractWidgetTest, unittest.TestCase):
|
class NotebookTest(AbstractWidgetTest, unittest.TestCase):
|
||||||
OPTIONS = (
|
OPTIONS = (
|
||||||
'class', 'cursor', 'height', 'padding', 'style', 'takefocus', 'width',
|
'class', 'cursor', 'height', 'padding', 'style', 'takefocus', 'width',
|
||||||
|
@ -983,6 +982,20 @@ class NotebookTest(AbstractWidgetTest, unittest.TestCase):
|
||||||
def create(self, **kwargs):
|
def create(self, **kwargs):
|
||||||
return ttk.Notebook(self.root, **kwargs)
|
return ttk.Notebook(self.root, **kwargs)
|
||||||
|
|
||||||
|
def test_configure_height(self):
|
||||||
|
widget = self.create()
|
||||||
|
if get_tk_patchlevel(self.root) < (8, 6, 15):
|
||||||
|
self.checkIntegerParam(widget, 'height', 402, -402, 0)
|
||||||
|
else:
|
||||||
|
self.checkPixelsParam(widget, 'height', '10c', 402, -402, 0, conv=False)
|
||||||
|
|
||||||
|
def test_configure_width(self):
|
||||||
|
widget = self.create()
|
||||||
|
if get_tk_patchlevel(self.root) < (8, 6, 15):
|
||||||
|
self.checkIntegerParam(widget, 'width', 402, -402, 0)
|
||||||
|
else:
|
||||||
|
self.checkPixelsParam(widget, 'width', '10c', 402, -402, 0, conv=False)
|
||||||
|
|
||||||
def test_tab_identifiers(self):
|
def test_tab_identifiers(self):
|
||||||
self.nb.forget(0)
|
self.nb.forget(0)
|
||||||
self.nb.hide(self.child2)
|
self.nb.hide(self.child2)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Updated ``test_ttk`` to pass with Tcl/Tk 8.6.15.
|
Loading…
Add table
Add a link
Reference in a new issue