mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-09-05 01:10:12 +02:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
35 lines
914 B
Python
35 lines
914 B
Python
import imp_unittest, unittest
|
|
import wtc
|
|
import wx
|
|
import wx.adv
|
|
import os
|
|
|
|
tipFile = os.path.join(os.path.dirname(__file__), 'tips.txt')
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
class tipdlg_Tests(wtc.WidgetTestCase):
|
|
|
|
def test_tipdlg1(self):
|
|
tp = wx.adv.CreateFileTipProvider(tipFile, 0);
|
|
wx.CallLater(150, self.closeDialogs)
|
|
wx.adv.ShowTip(self.frame, tp)
|
|
self.myYield()
|
|
|
|
|
|
def test_tipdlg2(self):
|
|
class MyTipProvider(wx.adv.TipProvider):
|
|
def GetTip(self):
|
|
return "This is my tip"
|
|
|
|
wx.CallLater(150, self.closeDialogs)
|
|
wx.adv.ShowTip(self.frame, MyTipProvider(0))
|
|
self.myYield()
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|