This is a task tracking unit tests that should be added, and provides instructions on how to find new unit tests that should be added . Adding unit tests is a simple way for new contributors to explore the library.
To find code not yet tested, run coverage as mentioned here: https://www.mediawiki.org/wiki/Manual:Pywikibot/Test_coverage#Library , or browse https://codecov.io/github/wikimedia/pywikibot-core
Some 'missing tests' information extracted from comments in the source code of the tests:
site_tests: ~~newimages~~, ~~longpages~~, ~~shortpages~~, ~~ancientpages~~, ~~unwatchedpages~~
page_tests: autoFormat, isAutoTitle, getOldVersion, ~~getReferences~~, ~~backlinks~~, ~~embeddedin~~, getVersionHistory, getVersionHistoryTable, fullVersionHistory, contributingUsers
Google Code-in clonable task description:
Improve the code coverage (see https://en.wikipedia.org/wiki/code_coverage ) of the Pywikibot library test suite. Run "coverage" using instructions on https://www.mediawiki.org/wiki/Manual:Pywikibot/Test_coverage#Library and select a set of lines of code that are not yet exercised by the [[http://git.wikimedia.org/tree/pywikibot%2Fcore.git/master/tests | extensive test suite ]]. Add a unit test which exercises that set of lines of code to the test suite, and after the code is merged it will be automatically [[https://travis-ci.org/wikimedia/pywikibot-core/builds | tested on travis-ci ]]. Create bugs for any failures encountered. See https://gerrit.wikimedia.org/r/#/c/178891 as an example of this task.
The Phabricator task for tracking missing library tests is https://phabricator.wikimedia.org/T60941 .