unittest updates and new test modules

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-09-15 16:16:21 +00:00
parent 7d7b8b77b8
commit a548f7224d
24 changed files with 454 additions and 48 deletions

36
unittests/test_brush.py Normal file
View File

@@ -0,0 +1,36 @@
import imp_unittest, unittest
import wtc
import wx
import os
pngFile = os.path.join(os.path.dirname(__file__), 'toucan.png')
#---------------------------------------------------------------------------
class BrushTests(wtc.WidgetTestCase):
def test_BrushCtors(self):
b = wx.Brush()
b = wx.Brush(wx.Colour(1,2,3), wx.BRUSHSTYLE_SOLID)
bmp = wx.Bitmap(pngFile)
b = wx.Brush(bmp)
copy = wx.Brush(b)
def test_BrushOperators(self):
b1 = wx.Brush(wx.Colour(1,2,3), wx.BRUSHSTYLE_SOLID)
b2 = wx.Brush(wx.Colour(1,2,3), wx.BRUSHSTYLE_SOLID)
b3 = wx.Brush(wx.Colour(4,5,6), wx.BRUSHSTYLE_SOLID)
self.assertTrue(b1 == b2)
self.assertTrue(b2 != b3)
self.assertFalse(b1 != b2)
self.assertFalse(b2 == b3)
#---------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()