File: test_notebook.py

package info (click to toggle)
wxpython4.0 4.0.7%2Bdfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 210,992 kB
  • sloc: cpp: 888,989; python: 226,808; makefile: 52,078; ansic: 45,837; sh: 3,014; xml: 1,534; javascript: 436; perl: 264
file content (52 lines) | stat: -rw-r--r-- 1,293 bytes parent folder | download | duplicates (2)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import unittest
from unittests 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_notebookEventTypes(self):
        wx.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
        wx.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
        wx.EVT_NOTEBOOK_PAGE_CHANGED
        wx.EVT_NOTEBOOK_PAGE_CHANGING

    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()