Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-124378: Update test_ttk for Tcl/Tk 8.6.15 #124542

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions Lib/test/test_ttk/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,8 +963,7 @@ def create(self, **kwargs):
return ttk.Scrollbar(self.root, **kwargs)


@add_standard_options(PixelSizeTests if tk_version >= (8, 7) else IntegerSizeTests,
StandardTtkOptionsTests)
@add_standard_options(StandardTtkOptionsTests)
class NotebookTest(AbstractWidgetTest, unittest.TestCase):
OPTIONS = (
'class', 'cursor', 'height', 'padding', 'style', 'takefocus', 'width',
Expand All @@ -983,6 +982,20 @@ def setUp(self):
def create(self, **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):
self.nb.forget(0)
self.nb.hide(self.child2)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated ``test_ttk`` to pass with Tcl/Tk 8.6.15.
Loading