mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-15 17:20:07 +01:00
More tests
This commit is contained in:
@@ -26,6 +26,12 @@ class ribbon_buttonbar_Tests(wtc.WidgetTestCase):
|
||||
bmp = wx.Bitmap(16,16)
|
||||
b = bb.AddButton(100, "label", bmp, "help string")
|
||||
|
||||
with self.assertRaises(AttributeError):
|
||||
bb.SetItemClientData
|
||||
|
||||
with self.assertRaises(AttributeError):
|
||||
bb.GetItemClientData
|
||||
|
||||
|
||||
def test_ribbon_buttonbar4(self):
|
||||
evt = wx.ribbon.RibbonButtonBarEvent()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -24,12 +24,14 @@ class ribbon_panel_Tests(wtc.WidgetTestCase):
|
||||
|
||||
|
||||
def test_ribbon_panel3(self):
|
||||
bar = wx.ribbon.RibbonBar(self.frame)
|
||||
p = wx.ribbon.RibbonPanel()
|
||||
p.Create(self.frame)
|
||||
p.Create(bar)
|
||||
|
||||
|
||||
def test_ribbon_panel4(self):
|
||||
p = wx.ribbon.RibbonPanel(self.frame)
|
||||
bar = wx.ribbon.RibbonBar(self.frame)
|
||||
p = wx.ribbon.RibbonPanel(bar)
|
||||
|
||||
p.GetMinimisedIcon()
|
||||
p.HasExtButton()
|
||||
|
||||
Reference in New Issue
Block a user