mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 12:00:13 +01:00
Add unittests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
57
unittests/test_slider.py
Normal file
57
unittests/test_slider.py
Normal file
@@ -0,0 +1,57 @@
|
||||
import imp_unittest, unittest
|
||||
import wtc
|
||||
import wx
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class slider_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_sliderCtor(self):
|
||||
s1 = wx.Slider(self.frame)
|
||||
s2 = wx.Slider(self.frame, value=5, minValue=1, maxValue=10)
|
||||
|
||||
def test_sliderDefaultCtor(self):
|
||||
s = wx.Slider()
|
||||
s.Create(self.frame)
|
||||
|
||||
def test_sliderRange(self):
|
||||
s = wx.Slider(self.frame)
|
||||
s.SetRange(25, 75)
|
||||
self.assertTrue(s.GetRange() == (25, 75))
|
||||
self.assertTrue(s.Range == (25, 75))
|
||||
|
||||
|
||||
def test_sliderFlags(self):
|
||||
wx.SL_HORIZONTAL
|
||||
wx.SL_VERTICAL
|
||||
wx.SL_TICKS
|
||||
wx.SL_AUTOTICKS
|
||||
wx.SL_LEFT
|
||||
wx.SL_TOP
|
||||
wx.SL_RIGHT
|
||||
wx.SL_BOTTOM
|
||||
wx.SL_BOTH
|
||||
wx.SL_SELRANGE
|
||||
wx.SL_INVERSE
|
||||
wx.SL_MIN_MAX_LABELS
|
||||
wx.SL_VALUE_LABEL
|
||||
wx.SL_LABELS
|
||||
|
||||
def test_sliderProperties(self):
|
||||
s = wx.Slider(self.frame)
|
||||
s.LineSize
|
||||
s.Max
|
||||
s.Min
|
||||
s.PageSize
|
||||
s.SelEnd
|
||||
s.SelStart
|
||||
s.ThumbLength
|
||||
s.TickFreq
|
||||
s.Value
|
||||
s.Range
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user