Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix for 3.10: TypeError: get_tk_patchlevel() takes 0 positional argum…
…ents but 1 was given
  • Loading branch information
hugovk committed Feb 18, 2025
commit f32604fd0a6587227eda705a14cb11befa145ccd
4 changes: 2 additions & 2 deletions Lib/tkinter/test/test_tkinter/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def test_configure_tabs(self):
self.checkParam(widget, 'tabs', (10.2, 20.7, '1i', '2i'))
self.checkParam(widget, 'tabs', '10.2 20.7 1i 2i',
expected=(10.2, 20.7, '1i', '2i')
if get_tk_patchlevel(self.root) >= (8, 6, 14)
if get_tk_patchlevel() >= (8, 6, 14)
else ('10.2', '20.7', '1i', '2i'))
self.checkParam(widget, 'tabs', '2c left 4c 6c center',
expected=('2c', 'left', '4c', '6c', 'center'))
Expand Down Expand Up @@ -1016,7 +1016,7 @@ def test_itemconfigure(self):
widget.itemconfigure()
with self.assertRaisesRegex(TclError, 'bad listbox index "red"'):
widget.itemconfigure('red')
if get_tk_patchlevel(self.root) >= (8, 6, 14):
if get_tk_patchlevel() >= (8, 6, 14):
prefix = ('background', '', '', '')
else:
prefix = ('background', 'background', 'Background', '')
Expand Down
2 changes: 1 addition & 1 deletion Lib/tkinter/test/test_ttk/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_configure_class(self):

def test_configure_padding(self):
widget = self.create()
if get_tk_patchlevel(self.root) < (8, 6, 14):
if get_tk_patchlevel() < (8, 6, 14):
def padding_conv(value):
self.assertIsInstance(value, tuple)
return tuple(map(str, value))
Expand Down