[Python-checkins] cpython (3.3): Print Tk patchlevel in Tk and Ttk tests in verbose mode (issue19654).

serhiy.storchaka python-checkins at python.org
Thu Nov 21 18:24:32 CET 2013


http://hg.python.org/cpython/rev/cfbd894f1df1
changeset:   87314:cfbd894f1df1
branch:      3.3
parent:      87304:7b040bc289e8
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Thu Nov 21 19:23:19 2013 +0200
summary:
  Print Tk patchlevel in Tk and Ttk tests in verbose mode (issue19654).

files:
  Lib/tkinter/test/test_tkinter/test_widgets.py |  3 ++-
  Lib/tkinter/test/test_ttk/test_widgets.py     |  3 ++-
  Lib/tkinter/test/widget_tests.py              |  6 ++++++
  3 files changed, 10 insertions(+), 2 deletions(-)


diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py
--- a/Lib/tkinter/test/test_tkinter/test_widgets.py
+++ b/Lib/tkinter/test/test_tkinter/test_widgets.py
@@ -7,7 +7,8 @@
                                   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')
 
diff --git a/Lib/tkinter/test/test_ttk/test_widgets.py b/Lib/tkinter/test/test_ttk/test_widgets.py
--- a/Lib/tkinter/test/test_ttk/test_widgets.py
+++ b/Lib/tkinter/test/test_ttk/test_widgets.py
@@ -8,7 +8,8 @@
 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')
 
diff --git a/Lib/tkinter/test/widget_tests.py b/Lib/tkinter/test/widget_tests.py
--- a/Lib/tkinter/test/widget_tests.py
+++ b/Lib/tkinter/test/widget_tests.py
@@ -491,3 +491,9 @@
                     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'))

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list