- Phoenix-port of `wx.lib.buttons.py`, with unittest and documentation updated to Phoenix standards;
- Phoenix-port of part of the AGW library, including `AdvancedSplash`, `BalloonTip`, `ButtonPanel`, `CubeColourDialog`, `CustomTreeCtrl`, `FloatSpin`, `FoldPanelBar`, `FourWaySplitter`, `GenericMessageDialog`, `HyperLinkCtrl` and `HyperTreeList`. Unittests and documentation updated to Phoenix standards;
- Added the `wx2to3.py` module to `wx.lib`, to facilitate the port to Python 3 (AGW depends on it).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Andrea Gavana
2012-07-16 16:52:14 +00:00
parent 4f6b6ff7ee
commit 6bfa39aff0
26 changed files with 2605 additions and 627 deletions

View File

@@ -0,0 +1,43 @@
import imp_unittest, unittest
import wtc
import wx
import wx.lib.agw.genericmessagedialog as GMD
#---------------------------------------------------------------------------
class lib_agw_genericmessagedialog_Tests(wtc.WidgetTestCase):
def test_lib_agw_genericmessagedialogCtor(self):
dlg = GMD.GenericMessageDialog(self.frame, 'Hello World', 'A Nice Message Box',
agwStyle=wx.ICON_INFORMATION|wx.OK)
def test_lib_agw_genericmessagedialogMethods(self):
dlg = GMD.GenericMessageDialog(self.frame, 'Hello World', 'A Nice Message Box',
agwStyle=wx.ICON_INFORMATION|wx.OK)
# Test custom and default button labels
for kind in ['OK', 'Yes', 'No', 'Help', 'Cancel']:
default = 'GetDefault%sLabel()'%kind
custom = 'GetCustom%sLabel()'%kind
self.assertEqual(eval('dlg.%s'%default), eval('dlg.%s'%custom))
self.assertTrue(not dlg.HasCustomBitmaps())
self.assertTrue(not dlg.GetExtendedMessage())
dlg.SetExtendedMessage('An extended message')
self.assertEqual(dlg.GetFullMessage(), '%s\n\n%s'%(dlg.GetMessage(), dlg.GetExtendedMessage()))
def test_lib_agw_genericmessagedialogConstantsExists(self):
GMD.BUTTON_SIZER_FLAGS
GMD.GMD_DEFAULT
GMD.GMD_USE_AQUABUTTONS
GMD.GMD_USE_GRADIENTBUTTONS
#---------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()