mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Phoenix:
- Phoenix-port of `wx.lib.newevent.py`, with documentation. No unittest for it as I have no idea of what test to write; - Phoenix-port of `wx.lib.expando.py`, with unittest and documentation. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
25
unittests/test_lib_expando.py
Normal file
25
unittests/test_lib_expando.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import imp_unittest, unittest
|
||||
import wtc
|
||||
import wx
|
||||
import wx.lib.expando
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class lib_expando_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_lib_expando1(self):
|
||||
pnl = wx.Panel(self.frame)
|
||||
w = wx.lib.expando.ExpandoTextCtrl(pnl, value="This is a test", pos=(10,10))
|
||||
bs1 = w.GetSize()
|
||||
|
||||
w.AppendText("\nThis is a New Label")
|
||||
bs2 = w.GetSize()
|
||||
|
||||
self.assertEqual(w.GetValue(), "This is a test\nThis is a New Label")
|
||||
self.assertEqual(w.GetNumberOfLines(), 3)
|
||||
self.assertTrue(bs2.height > bs1.height)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user