mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
phoenix-port and unittest for wx.lib.stattext
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
26
unittests/test_lib_stattext.py
Normal file
26
unittests/test_lib_stattext.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import imp_unittest, unittest
|
||||
import wtc
|
||||
import wx
|
||||
import wx.lib.stattext
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class lib_stattext_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_lib_stattext1(self):
|
||||
pnl = wx.Panel(self.frame)
|
||||
w = wx.lib.stattext.GenStaticText(pnl, label="This is a test", pos=(10,10))
|
||||
bs1 = w.GetEffectiveMinSize()
|
||||
|
||||
w.SetLabel("This is a New Label")
|
||||
w.SetFont(wx.FFont(16, wx.FONTFAMILY_ROMAN))
|
||||
bs2 = w.GetEffectiveMinSize()
|
||||
|
||||
self.assertEqual(w.GetLabel(), "This is a New Label")
|
||||
self.assertEqual(w.Label, "This is a New Label")
|
||||
self.assertTrue(bs2.height > bs1.height)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user