mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Phoenix:
- 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:
43
unittests/test_lib_agw_genericmessagedialog.py
Normal file
43
unittests/test_lib_agw_genericmessagedialog.py
Normal 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()
|
||||
Reference in New Issue
Block a user