test_treebook.py 1.24 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
import unittest
from unittests import wtc
import wx

#---------------------------------------------------------------------------

class treebook_Tests(wtc.WidgetTestCase):

    def test_treebook1(self):
        wx.wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED
        wx.wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING
        wx.wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED
        wx.wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED

        wx.EVT_TREEBOOK_PAGE_CHANGED
        wx.EVT_TREEBOOK_PAGE_CHANGING;
        wx.EVT_TREEBOOK_NODE_COLLAPSED;
        wx.EVT_TREEBOOK_NODE_EXPANDED;


    def test_treebook2(self):
        book = wx.Treebook()
        book.Create(self.frame)


    def test_treebook3(self):
        book = wx.Treebook(self.frame)
        book.AddPage(wx.Panel(book), 'one')
        book.AddPage(wx.Panel(book), 'two')
        book.AddSubPage(wx.Panel(book), 'three')


33 34 35 36 37 38 39 40 41 42
    def test_treebook4(self):
        book = wx.Treebook(self.frame)
        book.AddPage(wx.Panel(book), 'one')
        book.AddPage(wx.Panel(book), 'two')
        book.AddSubPage(wx.Panel(book), 'three')

        tree = book.GetTreeCtrl()
        assert isinstance(tree, wx.TreeCtrl)


43 44 45 46
#---------------------------------------------------------------------------

if __name__ == '__main__':
    unittest.main()