mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user