]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Print Tk patchlevel in Tk and Ttk tests in verbose mode (issue19654).
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 21 Nov 2013 17:23:19 +0000 (19:23 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 21 Nov 2013 17:23:19 +0000 (19:23 +0200)
Lib/tkinter/test/test_tkinter/test_widgets.py
Lib/tkinter/test/test_ttk/test_widgets.py
Lib/tkinter/test/widget_tests.py

index ed4914fcad56029e2ea34e88cffb89b3421cad43..d7321266af1d8d9174e2df8e751464b1c33ea1be 100644 (file)
@@ -7,7 +7,8 @@ from tkinter.test.support import (tcl_version, requires_tcl,
                                   get_tk_patchlevel, widget_eq)
 from tkinter.test.widget_tests import (
     add_standard_options, noconv, pixels_round,
-    AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests)
+    AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests,
+    setUpModule)
 
 requires('gui')
 
index 967a358a53e728ce5498398a076b6bf53ca6426d..0035214b8017c75f9de430542a9961220cba95cc 100644 (file)
@@ -8,7 +8,8 @@ import tkinter.test.support as support
 from tkinter.test.test_ttk.test_functions import MockTclObj
 from tkinter.test.support import tcl_version
 from tkinter.test.widget_tests import (add_standard_options, noconv,
-    AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests)
+    AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests,
+    setUpModule)
 
 requires('gui')
 
index 300aa41f568336acd6023278a0386911f3ccf5cc..14b4ca104d51d775b13c90da943296f3b426c6f0 100644 (file)
@@ -491,3 +491,9 @@ def add_standard_options(*source_classes):
                     setattr(cls, methodname, test)
         return cls
     return decorator
+
+def setUpModule():
+    import test.support
+    if test.support.verbose:
+        tcl = tkinter.Tcl()
+        print('patchlevel =', tcl.call('info', 'patchlevel'))