]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/samples/wxPIA_book/Chapter-05/testExample.py
fix building/running of tex2rtf
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-05 / testExample.py
... / ...
CommitLineData
1import unittest
2import modelExample
3import wx
4
5class TestExample(unittest.TestCase):
6
7 def setUp(self):
8 self.app = wx.PySimpleApp()
9 self.frame = modelExample.ModelExample(parent=None, id=-1)
10
11 def tearDown(self):
12 self.frame.Destroy()
13
14 def testModel(self):
15 self.frame.OnBarney(None)
16 self.assertEqual("Barney", self.frame.model.first,
17 msg="First is wrong")
18 self.assertEqual("Rubble", self.frame.model.last)
19
20def suite():
21 suite = unittest.makeSuite(TestExample, 'test')
22 return suite
23
24if __name__ == '__main__':
25 unittest.main(defaultTest='suite')
26