mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
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:
47
unittests/test_notebook.py
Normal file
47
unittests/test_notebook.py
Normal 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()
|
||||
Reference in New Issue
Block a user