summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-11-02 16:50:42 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-11-02 16:50:42 (GMT)
commit9788497e4b5ea642784b8c9628257a6ba4498cf1 (patch)
treeb30a476a62f4c34edd34521519d3c02c609c74fe /Lib/tkinter/test
parent5028f4d461fb0dbbfe7f0a952021af28b596d6af (diff)
downloadcpython-9788497e4b5ea642784b8c9628257a6ba4498cf1.zip
cpython-9788497e4b5ea642784b8c9628257a6ba4498cf1.tar.gz
cpython-9788497e4b5ea642784b8c9628257a6ba4498cf1.tar.bz2
Issue #19085: Fixed some Tkinter tests on Windows.
Diffstat (limited to 'Lib/tkinter/test')
-rw-r--r--Lib/tkinter/test/test_tkinter/test_widgets.py14
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
index 3475ad0..141bbf6 100644
--- a/Lib/tkinter/test/test_tkinter/test_widgets.py
+++ b/Lib/tkinter/test/test_tkinter/test_widgets.py
@@ -73,7 +73,10 @@ class ToplevelTest(AbstractToplevelTest, unittest.TestCase):
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 @@ class ToplevelTest(AbstractToplevelTest, unittest.TestCase):
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)