From 3b65107ee08957aeadd928db5c64856aa66e038c Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Wed, 9 Mar 2016 23:53:52 -0500 Subject: [PATCH] Skip the webkit tests if not on Mac --- unittests/test_webkit.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/unittests/test_webkit.py b/unittests/test_webkit.py index 3b2d899d..d4774563 100644 --- a/unittests/test_webkit.py +++ b/unittests/test_webkit.py @@ -1,32 +1,41 @@ import imp_unittest, unittest import wtc import wx -import wx.webkit +import sys +if sys.platform == 'darwin': + import wx.webkit #--------------------------------------------------------------------------- class webkit_Tests(wtc.WidgetTestCase): + @unittest.skipIf(sys.platform != 'darwin', 'WebKit only implemented on Mac') def test_webkit01(self): wk = wx.webkit.WebKitCtrl() wk.Create(self.frame) + @unittest.skipIf(sys.platform != 'darwin', 'WebKit only implemented on Mac') def test_webkit02(self): wk = wx.webkit.WebKitCtrl(self.frame) + @unittest.skipIf(sys.platform != 'darwin', 'WebKit only implemented on Mac') def test_webkit03(self): wk = wx.webkit.WebKitCtrl(self.frame, -1, "http://wxpython.org") + @unittest.skipIf(sys.platform != 'darwin', 'WebKit only implemented on Mac') def test_webkit04(self): e = wx.webkit.WebKitBeforeLoadEvent() + @unittest.skipIf(sys.platform != 'darwin', 'WebKit only implemented on Mac') def test_webkit05(self): e = wx.webkit.WebKitStateChangedEvent() + @unittest.skipIf(sys.platform != 'darwin', 'WebKit only implemented on Mac') def test_webkit06(self): e = wx.webkit.WebKitNewWindowEvent() + @unittest.skipIf(sys.platform != 'darwin', 'WebKit only implemented on Mac') def test_webkit07(self): wx.webkit.WEBKIT_STATE_START wx.webkit.WEBKIT_STATE_NEGOTIATING @@ -51,6 +60,7 @@ class webkit_Tests(wtc.WidgetTestCase): wx.webkit.EVT_WEBKIT_NEW_WINDOW + @unittest.skipIf(sys.platform != 'darwin', 'WebKit only implemented on Mac') def test_webkit08(self): wx.webkit.wxEVT_WEBKIT_STATE_CHANGED wx.webkit.wxEVT_WEBKIT_BEFORE_LOAD