fakewidgets python package

fakewidgets

fakewidgets is a python package that fakes wxpython classes in order to allow unit testing. When you import the module, it overwrites the modules in the wx namespace with fake classes.

Here is an example of use:

import fakewidgets import simpleframe class TestSimpleFrame(object): def setup(self): self.frame = simpleframe.SimpleFrame(None, title="Simple") def test_create(self): pass class TestSimpleApp(object): def setup(self): self.app = simpleframe.SimpleApp(0) def test_create(self): pass def test_on_init(self): retval = self.app.OnInit() assert retval == 1, retval

Downloads

fakewidgets-01.zip (source-code installer)

fakewidgets.zip (code + Mercurial repo)