[TIP] unit testing wxPython wrapper objects.

Vladimir Ignatov kmisoft at gmail.com
Fri Mar 9 00:31:36 PST 2007


Hello,

Yes, starting/stopping wxApp for every test definetily slow things
down enormously. So for my wx unittesting I use a simple trick: I only
start wxApp + wxFrame once in the "outer" code and then reuse them in
tests. To gain access to the frame object individual tests use
wxGetApp().GetTopWindow() sequence. Surely there are some drawbacks it
such technique but it can definetily speed things up to acceptable
level.

Vladimir Ignatov



More information about the testing-in-python mailing list