1import unittest
2from unittests import wtc
3import wx
4
5#---------------------------------------------------------------------------
6
7class ChoiceTests(wtc.WidgetTestCase):
8
9    def test_ChoiceCtors(self):
10        c = wx.Choice(self.frame, choices="one two three four".split())
11        c = wx.Choice(self.frame, -1, wx.Point(10,10), wx.Size(80,-1),
12                      "one two three four".split(), 0)
13        c = wx.Choice(self.frame, -1, (10,10), (80,-1), "one two three four".split(), 0)
14
15        self.assertTrue(c.GetCount() == 4)
16
17
18    def test_ChoiceDefaultCtor(self):
19        c = wx.Choice()
20        c.Create(self.frame, choices="one two three four".split())
21
22
23    def test_ChoiceProperties(self):
24        c = wx.Choice(self.frame, choices="one two three four".split())
25
26        # do the properties exist?
27        c.Columns
28        c.Count
29        c.CurrentSelection
30        c.Selection
31
32
33#---------------------------------------------------------------------------
34
35
36if __name__ == '__main__':
37    unittest.main()
38