Author: hirokazu.yamamoto Date: Thu Sep 30 05:06:08 2010 New Revision: 85123 Log: Probably this is last trial on unittest.... Modified: python/branches/release27-maint-ttk-debug-on-xp5/Lib/lib-tk/test/test_ttk/test_extensions.py Modified: python/branches/release27-maint-ttk-debug-on-xp5/Lib/lib-tk/test/test_ttk/test_extensions.py ============================================================================== --- python/branches/release27-maint-ttk-debug-on-xp5/Lib/lib-tk/test/test_ttk/test_extensions.py (original) +++ python/branches/release27-maint-ttk-debug-on-xp5/Lib/lib-tk/test/test_ttk/test_extensions.py Thu Sep 30 05:06:08 2010 @@ -15,6 +15,9 @@ CODES_SIZE = 100 WAIT = 1 * 60 # XXX: adjust here +def debug(s): + print >>sys.stdout, s + sys.stdout.flush() class LabeledScaleTest(unittest.TestCase): @@ -114,13 +117,11 @@ def test_horizontal_range(self): lscale = ttk.LabeledScale(from_=0, to=10) lscale.pack() - print("===> enter lscale.wait_visibility....") + debug("===> enter lscale.wait_visibility....") lscale.wait_visibility() - print("===> leave lscale.wait_visibility....") + debug("===> leave lscale.wait_visibility....") lscale.update() - time.sleep(2 * 60) - linfo_1 = lscale.label.place_info() prev_xcoord = lscale.scale.coords()[0] self.assertEqual(prev_xcoord, int(linfo_1['x'])) @@ -296,16 +297,16 @@ def threadfunc(): while 1: old_code_count = code_count - print("----> thread sleeping now...") + debug("----> thread sleeping now...") time.sleep(WAIT) - print("----> thread awakened ....") + debug("----> thread awakened ....") if old_code_count == code_count: break - print("===================") + debug("===================") for code in codes: if code is None: continue - print(code) + debug(code) t = threading.Thread(target=threadfunc) t.start() try:
participants (1)
-
hirokazu.yamamoto