Add some Html unittests, and fix some issues discovered by the tests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-11-01 22:51:42 +00:00
parent 79e9959281
commit d4ce9984ff
15 changed files with 116 additions and 53 deletions

View File

@@ -1,14 +1,24 @@
import imp_unittest, unittest
import wtc
import wx
import wx.html
#---------------------------------------------------------------------------
class htmlprint_Tests(wtc.WidgetTestCase):
# TODO: Remove this test and add real ones.
def test_htmlprint1(self):
self.fail("Unit tests for htmlprint not implemented yet.")
def test_htmlprint1(self):
size = (100,100)
bmp = wx.Bitmap(*size)
dc = wx.MemoryDC(bmp)
obj = wx.html.HtmlDCRenderer()
obj.SetDC(dc)
obj.SetSize(*size)
obj.SetHtmlText('<body><h1>Hello World</h1></body>')
obj.Render(0,0, [])
#---------------------------------------------------------------------------