Skip the webkit tests if not on Mac

This commit is contained in:
Scott Talbert
2016-03-09 23:53:52 -05:00
parent aab2833c76
commit 3b65107ee0

View File

@@ -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