[Python-checkins] cpython (3.3): Issue #19085: Fixed some Tkinter tests on Windows.
serhiy.storchaka
python-checkins at python.org
Sat Nov 2 17:54:17 CET 2013
http://hg.python.org/cpython/rev/f25679db52fb
changeset: 86853:f25679db52fb
branch: 3.3
parent: 86844:b77c1a19028e
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sat Nov 02 18:50:42 2013 +0200
summary:
Issue #19085: Fixed some Tkinter tests on Windows.
files:
Lib/tkinter/test/test_tkinter/test_widgets.py | 14 +++++-----
1 files changed, 7 insertions(+), 7 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
@@ -73,7 +73,10 @@
def test_screen(self):
widget = self.create()
self.assertEqual(widget['screen'], '')
- display = os.environ['DISPLAY']
+ try:
+ display = os.environ['DISPLAY']
+ except KeyError:
+ self.skipTest('No $DISPLAY set.')
self.checkInvalidParam(widget, 'screen', display,
errmsg="can't modify -screen option after widget is created")
widget2 = self.create(screen=display)
@@ -82,13 +85,10 @@
def test_use(self):
widget = self.create()
self.assertEqual(widget['use'], '')
- widget1 = self.create(container=True)
- self.assertEqual(widget1['use'], '')
- self.checkInvalidParam(widget1, 'use', '0x44022',
- errmsg="can't modify -use option after widget is created")
- wid = hex(widget1.winfo_id())
+ parent = self.create(container=True)
+ wid = parent.winfo_id()
widget2 = self.create(use=wid)
- self.assertEqual(widget2['use'], wid)
+ self.assertEqual(int(widget2['use']), wid)
@add_standard_options(StandardOptionsTests)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list