mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-09-05 01:10:12 +02:00
* Changed imports to use either absolute or explicit relative imports. Implicit relative imports are no longer allowed. * Changes to accomodate standard library classes or modues moving to other locations, or being removed entirely. * Changes related to print becoming a function, execfile being removed, u'' no longer allowed, and other syntax related issues. * Working around C APIs that have changed or simply vanished. (PyInt, PyString, PyBytes, etc.) * Dealing with text file objects using strings vs binary file objects using bytes, auto-encoding, and etc. * Replacing the use of PyCObject with PyCapsule and dealing with an apparent bug where PyCapsule objects can't be imported from submodules within a package. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
71 lines
2.2 KiB
Python
71 lines
2.2 KiB
Python
import imp_unittest, unittest
|
|
import wtc
|
|
import wx
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
class pickers_Tests(wtc.WidgetTestCase):
|
|
|
|
def test_pickersColour(self):
|
|
p = wx.ColourPickerCtrl(self.frame, colour='blue')
|
|
self.assertTrue(p.GetColour() == wx.Colour(0, 0, 0xff))
|
|
|
|
def test_pickersColourConstants(self):
|
|
wx.CLRP_USE_TEXTCTRL
|
|
wx.CLRP_DEFAULT_STYLE
|
|
wx.CLRP_SHOW_LABEL
|
|
wx.wxEVT_COMMAND_COLOURPICKER_CHANGED
|
|
wx.EVT_COLOURPICKER_CHANGED
|
|
wx.ColourPickerEvent
|
|
|
|
|
|
def test_pickersFile(self):
|
|
p = wx.FilePickerCtrl(self.frame, path='/tmp', wildcard='*.foo')
|
|
self.assertTrue(p.Path == '/tmp')
|
|
|
|
def test_pickersFileConstants(self):
|
|
wx.FLP_OPEN
|
|
wx.FLP_SAVE
|
|
wx.FLP_OVERWRITE_PROMPT
|
|
wx.FLP_FILE_MUST_EXIST
|
|
wx.FLP_CHANGE_DIR
|
|
wx.FLP_SMALL
|
|
wx.FLP_USE_TEXTCTRL
|
|
wx.FLP_DEFAULT_STYLE
|
|
|
|
wx.DIRP_DIR_MUST_EXIST
|
|
wx.DIRP_CHANGE_DIR
|
|
wx.DIRP_SMALL
|
|
wx.DIRP_USE_TEXTCTRL
|
|
wx.DIRP_DEFAULT_STYLE
|
|
|
|
wx.wxEVT_COMMAND_FILEPICKER_CHANGED
|
|
wx.wxEVT_COMMAND_DIRPICKER_CHANGED
|
|
wx.EVT_FILEPICKER_CHANGED
|
|
wx.EVT_DIRPICKER_CHANGED
|
|
wx.FileDirPickerEvent
|
|
|
|
|
|
def test_pickersDir(self):
|
|
p = wx.DirPickerCtrl(self.frame, path='/tmp')
|
|
self.assertTrue(p.Path == '/tmp')
|
|
|
|
def test_pickersFont(self):
|
|
p = wx.FontPickerCtrl(self.frame, font=wx.NORMAL_FONT)
|
|
|
|
def test_pickersFontConstatnt(self):
|
|
wx.FNTP_FONTDESC_AS_LABEL
|
|
wx.FNTP_USEFONT_FOR_LABEL
|
|
wx.FONTBTN_DEFAULT_STYLE
|
|
wx.FNTP_USE_TEXTCTRL
|
|
wx.FNTP_DEFAULT_STYLE
|
|
wx.wxEVT_COMMAND_FONTPICKER_CHANGED;
|
|
wx.EVT_FONTPICKER_CHANGED
|
|
wx.FontPickerEvent
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|