- 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,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()