Page MenuHomePhabricator

Missing unit tests for pywikibot library (tracking)
Closed, InvalidPublic

Description

DO NOT USE - Superseded by Pywikibot-tests


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, 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 (only partially done), getOldVersion, getReferences, backlinks, embeddedin, getVersionHistory, getVersionHistoryTable, fullVersionHistory, contributingUsers

There are also some notes on using coverage at https://www.mediawiki.org/wiki/Manual:Pywikibot/Test_coverage#Library

Google Code-in clonable task description:

Browse [codecov analysis of Pywikibot](https://codecov.io/gh/wikimedia/pywikibot-core) and select a set of lines of code that are not yet exercised by the [extensive test suite](https://github.com/wikimedia/pywikibot-core/tree/master/tests). 
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 [tested on travis-ci](https://travis-ci.org/wikimedia/pywikibot-core/builds). 
[Create bug reports](https://www.mediawiki.org/wiki/How_to_report_a_bug) in [Wikimedia Phabricator](https://www.mediawiki.org/wiki/Phabricator/Help) for any relevant failures encountered. 
See the provided patch in Gerrit at 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

Pywikibot is a Python-based framework to write bots for MediaWiki ([more information](https://www.mediawiki.org/wiki/Manual:Pywikibot). [Documentation on Gerrit is available](https://www.mediawiki.org/wiki/Manual:Pywikibot/Gerrit).

Mentors: @jayvdb

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 261866 had a related patch set uploaded (by Sn1per):
Unit tests for Site.{long,short,ancient,unwatched}pages()

https://gerrit.wikimedia.org/r/261866

Change 261866 merged by jenkins-bot:
Unit tests for Site.{long,short,ancient,unwatched}pages()

https://gerrit.wikimedia.org/r/261866

Change 265674 had a related patch set uploaded (by AndyTechGuy):
Add tests for deprecated namespace shortcuts

https://gerrit.wikimedia.org/r/265674

Change 265674 merged by jenkins-bot:
Add tests for deprecated namespace shortcuts

https://gerrit.wikimedia.org/r/265674

Danny_B renamed this task from [tracking] [clonable] Missing unit tests for pywikibot library to Missing unit tests for pywikibot library (tracking).May 27 2016, 6:00 PM
jayvdb updated the task description. (Show Details)

This one hasnt been published yet.

jayvdb added a project: Google-Code-in-2017.
jayvdb updated the task description. (Show Details)
jayvdb updated the task description. (Show Details)

Some subtasks are also listed in New tests needed column on Pywikibot-tests

Change 401083 had a related patch set uploaded (by Anpans; owner: Anpans):
[pywikibot/core@master] [TEST] Add Test for site.botusers() method

https://gerrit.wikimedia.org/r/401083

Change 401083 merged by jenkins-bot:
[pywikibot/core@master] [TEST] Add Test for site.botusers() method

https://gerrit.wikimedia.org/r/401083

Change 401408 had a related patch set uploaded (by Framawiki; owner: Framawiki):
[pywikibot/core@master] [TEST] Add tests for User class

https://gerrit.wikimedia.org/r/401408

Change 401408 merged by jenkins-bot:
[pywikibot/core@master] [TEST] Add tests for User class

https://gerrit.wikimedia.org/r/401408

Change 402415 had a related patch set uploaded (by Framawiki; owner: Framawiki):
[pywikibot/core@master] [TEST] Add tests to a bot account for User class

https://gerrit.wikimedia.org/r/402415

Change 402415 merged by jenkins-bot:
[pywikibot/core@master] [TEST] Add tests to a bot account for User class

https://gerrit.wikimedia.org/r/402415

Change 405027 had a related patch set uploaded (by Framawiki; owner: Framawiki):
[pywikibot/core@master] [TEST] Add tests for flow.Topic class

https://gerrit.wikimedia.org/r/405027

Change 405027 merged by jenkins-bot:
[pywikibot/core@master] [TEST] Add tests for flow.Topic class

https://gerrit.wikimedia.org/r/405027

Change 404076 had a related patch set uploaded (by Eisenhaus335; owner: Eisenhaus335):
[pywikibot/core@master] Create Module Tests

https://gerrit.wikimedia.org/r/404076

Change 404076 abandoned by Xqt:
Create Module Tests

Reason:
See my last comment

https://gerrit.wikimedia.org/r/404076

Change 478731 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [tests] exclude some files and folders from code coverage

https://gerrit.wikimedia.org/r/478731

Change 478731 merged by jenkins-bot:
[pywikibot/core@master] [tests] exclude some files and folders from code coverage

https://gerrit.wikimedia.org/r/478731

Change 612838 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [tests] Additional tests for UploadRobot

https://gerrit.wikimedia.org/r/612838

Change 612838 merged by jenkins-bot:
[pywikibot/core@master] [tests] Additional tests for UploadRobot

https://gerrit.wikimedia.org/r/612838

Change 671657 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [tests] add test for pywikibot.input_yn

https://gerrit.wikimedia.org/r/671657

Change 671657 merged by jenkins-bot:
[pywikibot/core@master] [tests] add test for pywikibot.input_yn

https://gerrit.wikimedia.org/r/671657

Aklapper updated the task description. (Show Details)