Add tests for wx.Notebook and wx.Panel

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-10-22 02:30:11 +00:00
parent 0a753ead2d
commit c14d84f3ee
3 changed files with 72 additions and 1 deletions

View File

@@ -0,0 +1,47 @@
import imp_unittest, unittest
import wtc
import wx
#---------------------------------------------------------------------------
class notebook_Tests(wtc.WidgetTestCase):
def test_notebookCtor(self):
nb = wx.Notebook(self.frame)
def test_notebookDefaultCtor(self):
nb = wx.Notebook()
nb.Create(self.frame)
def test_notebookStyles(self):
wx.NB_DEFAULT
wx.NB_TOP
wx.NB_BOTTOM
wx.NB_LEFT
wx.NB_RIGHT
wx.NB_FIXEDWIDTH
wx.NB_MULTILINE
wx.NB_NOPAGETHEME
wx.NB_FLAT
wx.NB_HITTEST_NOWHERE
wx.NB_HITTEST_ONICON
wx.NB_HITTEST_ONLABEL
wx.NB_HITTEST_ONITEM
wx.NB_HITTEST_ONPAGE
def test_notebookPages(self):
nb = wx.Notebook(self.frame, style=wx.NB_BOTTOM)
p1 = wx.Panel(nb)
nb.AddPage(p1, "Page1")
p2 = wx.Panel(nb)
nb.AddPage(p2, "Page2")
nb.SetSelection(0)
#---------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()