- Phoenix-port of another part of the AGW library, including `KnobCtrl`, `MultiDirDialog`, `PeakMeterCtrl`, `PyCollapsiblePane` and `PyGauge`. Unittests and documentation updated to Phoenix standards;
- Modified some methods names in the unittest for previously committed AGW widgets.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Andrea Gavana
2012-07-16 21:05:36 +00:00
parent 6bfa39aff0
commit bb9bd6c9b8
20 changed files with 926 additions and 184 deletions

View File

@@ -0,0 +1,47 @@
import imp_unittest, unittest
import wtc
import wx
import wx.lib.agw.pycollapsiblepane as PCP
#---------------------------------------------------------------------------
class lib_agw_pycollapsiblepane_Tests(wtc.WidgetTestCase):
def test_lib_agw_pycollapsiblepaneCtor(self):
pane = PCP.PyCollapsiblePane(self.frame, label='Some Data',
style=wx.CP_DEFAULT_STYLE|wx.CP_NO_TLW_RESIZE)
def test_lib_agw_pycollapsiblepaneMethods(self):
pane = PCP.PyCollapsiblePane(self.frame, label='Some Data',
style=wx.CP_DEFAULT_STYLE|wx.CP_NO_TLW_RESIZE)
content = pane.GetPane()
nameLbl = wx.StaticText(content, -1, "Name:")
name = wx.TextCtrl(content, -1, "");
# Some methods tests...
self.assertTrue(pane.GetWindowStyleFlag() & wx.CP_USE_STATICBOX == 0)
self.assertEqual(pane.GetLabel(), 'Some Data')
self.assertTrue(pane.IsCollapsed())
self.assertTrue(not pane.IsExpanded())
pane.Expand()
self.assertTrue(pane.IsExpanded())
def test_lib_agw_pycollapsiblepaneConstantsExist(self):
PCP.CP_DEFAULT_STYLE
PCP.CP_GTK_EXPANDER
PCP.CP_LINE_ABOVE
PCP.CP_NO_TLW_RESIZE
PCP.CP_USE_STATICBOX
def test_lib_agw_pycollapsiblepaneEvents(self):
PCP.EVT_COLLAPSIBLEPANE_CHANGED
#---------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()