File: test_notebook.py

package info (click to toggle)
wxpython4.0 4.2.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 232,540 kB
  • sloc: cpp: 958,937; python: 233,059; ansic: 150,441; makefile: 51,662; sh: 8,687; perl: 1,563; javascript: 584; php: 326; xml: 200
file content (54 lines) | stat: -rw-r--r-- 1,357 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
53
54
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_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)

    def test_notebookPageAlias(self):
        assert wx.NotebookPage is wx.Window

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


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