Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0b1386d

Browse files
Print Tk patchlevel in Tk and Ttk tests in verbose mode (issue19654).
1 parent d9a0182 commit 0b1386d

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

Lib/tkinter/test/test_tkinter/test_widgets.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
get_tk_patchlevel, widget_eq)
88
from tkinter.test.widget_tests import (
99
add_standard_options, noconv, pixels_round,
10-
AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests)
10+
AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests,
11+
setUpModule)
1112

1213
requires('gui')
1314

Lib/tkinter/test/test_ttk/test_widgets.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
from tkinter.test.test_ttk.test_functions import MockTclObj
99
from tkinter.test.support import tcl_version
1010
from tkinter.test.widget_tests import (add_standard_options, noconv,
11-
AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests)
11+
AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests,
12+
setUpModule)
1213

1314
requires('gui')
1415

Lib/tkinter/test/widget_tests.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,3 +491,9 @@ def test(self, option=option):
491491
setattr(cls, methodname, test)
492492
return cls
493493
return decorator
494+
495+
def setUpModule():
496+
import test.support
497+
if test.support.verbose:
498+
tcl = tkinter.Tcl()
499+
print('patchlevel =', tcl.call('info', 'patchlevel'))

0 commit comments

Comments
 (0)