forked from wxWidgets/wxPython-Classic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestGraphicsObject.py
More file actions
38 lines (30 loc) · 1.11 KB
/
testGraphicsObject.py
File metadata and controls
38 lines (30 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""Unit tests for wx.GraphicsObject.
Methods yet to test:
__del__"""
import unittest
import wx
class GraphicsObjectTest(unittest.TestCase):
def setUp(self):
self.testControl = wx.GraphicsObject()
def tearDown(self):
self.testControl.Destroy()
def testConstructor_wxGraphicsObjectTest(self):
"""__init__"""
self.testControl = wx.GraphicsObject()
self.assert_(isinstance(self.testControl, wx.GraphicsObject))
def testGetRenderer(self):
"""GetRenderer"""
# TODO: is there any way to set the renderer?
# or to check anything else?
self.assertEquals(None, self.testControl.GetRenderer())
def testIsNullFalse_wxGraphicsObjectOnly(self):
"""IsNull"""
for obj in (wx.NullGraphicsBrush,
wx.NullGraphicsFont,
wx.NullGraphicsMatrix,
wx.NullGraphicsPath,
wx.NullGraphicsPen):
self.assert_(obj.IsNull())
def testIsNullTrue(self):
"""IsNull"""
self.assert_(not self.testControl.IsNull())