More tests

This commit is contained in:
Robin Dunn
2016-07-04 22:37:01 -07:00
parent 383fa33fb0
commit a114260e57
3 changed files with 63 additions and 2 deletions

View File

@@ -12,6 +12,59 @@ class ribbon_gallery_Tests(wtc.WidgetTestCase):
wx.ribbon.RIBBON_GALLERY_BUTTON_ACTIVE
wx.ribbon.RIBBON_GALLERY_BUTTON_DISABLED
wx.ribbon.wxEVT_RIBBONGALLERY_HOVER_CHANGED
wx.ribbon.wxEVT_RIBBONGALLERY_SELECTED
wx.ribbon.wxEVT_RIBBONGALLERY_CLICKED
wx.ribbon.EVT_RIBBONGALLERY_HOVER_CHANGED
wx.ribbon.EVT_RIBBONGALLERY_SELECTED
wx.ribbon.EVT_RIBBONGALLERY_CLICKED
def test_ribbon_gallery2(self):
evt = wx.ribbon.RibbonGalleryEvent()
def test_ribbon_gallery3(self):
ribbon = wx.ribbon.RibbonBar(self.frame)
g = wx.ribbon.RibbonGallery()
g.Create(ribbon)
def test_ribbon_gallery4(self):
ribbon = wx.ribbon.RibbonBar(self.frame)
g = wx.ribbon.RibbonGallery(ribbon)
item = g.Append(wx.Bitmap(16,16), 101)
assert isinstance(item, wx.ribbon.RibbonGalleryItem)
def test_ribbon_gallery5(self):
ribbon = wx.ribbon.RibbonBar(self.frame)
g = wx.ribbon.RibbonGallery(ribbon)
with self.assertRaises(AttributeError):
g.SetItemClientData
with self.assertRaises(AttributeError):
g.GetItemClientData
@unittest.skip('because')
def test_ribbon_gallery6(self):
ribbon = wx.ribbon.RibbonBar(self.frame)
g = wx.ribbon.RibbonGallery(ribbon)
class _Data(object):
def __init__(self, **kw):
self.__dict__.update(kw)
data_in = _Data(a=1, b=2, c=3)
item = g.Append(wx.Bitmap(16,16), 102, data_in)
#data_out = g.GetItemClientObject(item)
#self.assertTrue(data_out is data_in)
#---------------------------------------------------------------------------