mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
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:
36
unittests/test_brush.py
Normal file
36
unittests/test_brush.py
Normal 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()
|
||||
Reference in New Issue
Block a user