mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 03:50:06 +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:
39
unittests/test_lib_agw_cubecolourdialog.py
Normal file
39
unittests/test_lib_agw_cubecolourdialog.py
Normal file
@@ -0,0 +1,39 @@
|
||||
import imp_unittest, unittest
|
||||
import wtc
|
||||
import wx
|
||||
|
||||
import wx.lib.agw.cubecolourdialog as CCD
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class lib_agw_cubecolourdialog_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_lib_agw_cubecolourdialogCtor(self):
|
||||
colourData = wx.ColourData()
|
||||
colourData.SetColour(wx.RED)
|
||||
dlg = CCD.CubeColourDialog(self.frame, colourData, agwStyle=0)
|
||||
|
||||
def test_lib_agw_cubecolourdialogMethods(self):
|
||||
colourData = wx.ColourData()
|
||||
colourData.SetColour(wx.BLUE)
|
||||
dlg = CCD.CubeColourDialog(self.frame, colourData, agwStyle=0)
|
||||
|
||||
self.assertTrue(dlg.GetAGWWindowStyleFlag() == 0)
|
||||
dlg.SetAGWWindowStyleFlag(CCD.CCD_SHOW_ALPHA)
|
||||
self.assertTrue(dlg.GetAGWWindowStyleFlag() > 0)
|
||||
|
||||
colour = dlg.GetRGBAColour()
|
||||
self.assertEqual(colour, wx.Colour('blue'))
|
||||
|
||||
ccd_colour = CCD.Colour(wx.Colour(colour))
|
||||
html = CCD.rgb2html(ccd_colour)
|
||||
self.assertTrue(html in CCD.HTMLCodes)
|
||||
|
||||
def test_lib_agw_cubecolourdialogConstantsExist(self):
|
||||
# CubeColourDialog agwStyle
|
||||
CCD.CCD_SHOW_ALPHA
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user