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

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-11-01 22:51:31 +00:00
parent 86598ce3cd
commit 79e9959281
19 changed files with 373 additions and 12 deletions

View File

@@ -1,14 +1,27 @@
import imp_unittest, unittest
import wtc
import wx
import wx.html
import os
helpPath = os.path.join(os.path.dirname(__file__), 'helpfiles')
#---------------------------------------------------------------------------
class helpwnd_Tests(wtc.WidgetTestCase):
# TODO: Remove this test and add real ones.
def test_helpwnd1(self):
self.fail("Unit tests for helpwnd not implemented yet.")
hc = wx.html.HtmlHelpController(wx.html.HF_EMBEDDED)
hw = wx.html.HtmlHelpWindow()
hc.SetHelpWindow(hw)
hw.Create(self.frame)
hc.AddBook(os.path.join(helpPath, 'testing.hhp'))
hc.AddBook(os.path.join(helpPath, 'another.hhp'))
self.frame.SendSizeEvent()
self.myYield()
#---------------------------------------------------------------------------