mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-09-05 17:30:26 +02:00
* move wxBrush to etg/brush.py * move wxBookCtrlBase and wxBookCtrlEvent to etg/bookctrl.py * move wxBitmapButton to etg/bmpbuttn.py * move wxArrayString MappedType and add wxArrayInt plus some unittests * add checking for default values for pos and size parameters in fixWindowClass * set out parameter flags for wxImageHistogram.FindFirstUnusedColour * Restore layout constraints classes and related methods * Create a MappedType for wxClientData * update used of wxClientData in wx.CommandEvent * Move wxControlWithItems, wxItemContainer and wxControlWithItems to etg/ctrlsub.py * enable some Append, Insert and Set overloads in wxControlWithItems * addGetterSetterProps: don't make setter-only properties * addGetterSetterProps: ensure that the getter can be called with zero args * addGetterSetterProps: ensure that the setter can be called with just 1 arg * restore version checking code * moved DC classes to other etg files to match interface file names. * allow both overloads for wx.DC.GetTextExtent and GetMultiLineTextExtent by renaming 1 * add wx.DC.GetPartialTextExtents * and some other stuff git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@68975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
import unittest2
|
|
import wxPhoenix as wx
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
class ArrayString(unittest2.TestCase):
|
|
|
|
if hasattr(wx, 'testArrayStringTypemap'):
|
|
def test_ArrayStringTypemaps(self):
|
|
# basic conversion of list or tuples of strings
|
|
seqList = ['a', u'b', 'hello world']
|
|
self.assertEqual(wx.testArrayStringTypemap(seqList), seqList)
|
|
seqTuple = ('a', u'b', 'hello world')
|
|
self.assertEqual(wx.testArrayStringTypemap(seqTuple), list(seqTuple))
|
|
|
|
def test_ArrayStringTypemapErrors(self):
|
|
# test error conditions
|
|
with self.assertRaises(TypeError):
|
|
wx.testArrayStringTypemap("STRING sequence")
|
|
with self.assertRaises(TypeError):
|
|
wx.testArrayStringTypemap(u"UNICODE sequence")
|
|
with self.assertRaises(TypeError):
|
|
wx.testArrayStringTypemap(["list", "with", "non-string", "items", 123])
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest2.main()
|