wxPython / tests /

"""Unit tests for wx.GraphicsBrush.

TODO: The docs say the only valid way to make an instance
        is with a CreateBrush call on a renderer or context.
        The constructor works but produces null brushes.
        is this correct?

Methods yet to test:

import unittest
import wx

import testGraphicsObject

class GraphicsBrushTest(testGraphicsObject.GraphicsObjectTest):
    def setUp(self):
        self.color = wx.Colour(0,0,0)
        self.brush = wx.Brush(self.color)
        self.renderer = wx.GraphicsRenderer.GetDefaultRenderer()
        self.testControl = self.renderer.CreateBrush(self.brush)
    def testConstructor_wxGraphicsBrushOnly(self):
        brush = wx.GraphicsBrush()
        self.assert_(isinstance(brush, wx.GraphicsBrush))
    def testGetRenderer(self):
        # Overrides test in testGraphicsObject.GraphicsObjectTest
        self.assertEquals(repr(self.renderer), repr(self.testControl.GetRenderer()))
    def testIsNullTrue(self):
        # Overrides test in testGraphicsObject.GraphicsObjectTest
        self.testControl = wx.GraphicsBrush()
if __name__ == '__main__':