Test wx.NullBrush and __nonzero__

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-10-01 07:34:39 +00:00
parent d2d1bcd923
commit 44bb0d6eaf

View File

@@ -27,6 +27,15 @@ class BrushTests(wtc.WidgetTestCase):
self.assertFalse(b1 != b2)
self.assertFalse(b2 == b3)
def test_nonzero(self):
b = wx.Brush(wx.Colour(1,2,3), wx.BRUSHSTYLE_SOLID)
if not b:
self.fail("__nonzero__ should have avoided this branch")
if wx.NullBrush:
self.fail("__nonzero__ should have avoided this branch")
def test_StockBrushesExist(self):
wx.BLUE_BRUSH
wx.GREEN_BRUSH
@@ -39,6 +48,8 @@ class BrushTests(wtc.WidgetTestCase):
wx.TRANSPARENT_BRUSH
wx.CYAN_BRUSH
wx.RED_BRUSH
wx.NullBrush
def test_StockBrushesInitialized(self):
self.assertTrue(wx.BLUE_BRUSH.IsOk())