https://bugzilla.wikimedia.org/show_bug.cgi?id=58941
--- Comment #2 from Merlijn van Deen valhallasw@arctus.nl --- Looking at old patches, or checking existing tests in the tests/ subdirectory are indeed the best options. I don't think there's any pywikibot-specific documentation for writing unit tests, but the python unittest docs ( http://docs.python.org/2/library/unittest.html ) will probably be useful.