GSoC/GCI Archive
Google Code-in 2014 Wikimedia Foundation

Pywikibot: Date Pagegenerator unit tests

completed by: Unicornisaurous

mentors: Fabian, John Vandenberg

Pywikibot is a Python-based framework to write bots for MediaWiki. See https://www.mediawiki.org/wiki/Manual:Pywikibot for more information. Patches can be submitted via Gerrit (you need a MediaWiki.org account). More documentation on Gerrit can be found at https://www.mediawiki.org/wiki/Manual:Pywikibot/Gerrit. After you have successfully claimed this task in Google Melange please do use the task in Phabricator for communication instead of Google Melange. This allows more PWB developers to be reached! General development questions can be asked on the Pywikibot mailing list at https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l and the #pywikibot IRC channel (see https://www.mediawiki.org/wiki/MediaWiki_on_IRC).

Help improve the code coverage (see https://en.wikipedia.org/wiki/code_coverage ) of the Pywikibot library test suite, and create bug reports. Pywikibot has two 'date' page generators which select a set of wiki pages for years and days, but they do not have test cases, and it is very likely that they wont function correctly/optimally on some wiki sites .

This task is to add unit tests for these generators to the existing extensive test suite, especially tests which demonstrate bugs when run on sites other than Wikipedias. After the code is merged, it will be automatically tested on travis-ci, so the unit tests need to be flexible enough to run on the four different wiki configurations.  See pagegenerators_tests.py for examples of similar unit tests.

The Phabricator task for tracking missing tests is https://phabricator.wikimedia.org/T85313 .

Students are required to read Wikimedia's general instructions at https://www.mediawiki.org/wiki/Google_Code-in_2014#Instructions_for_GCI_students first.