Page MenuHomePhabricator

Category methods members, subcategories and articles do not have unit tests
Closed, ResolvedPublic

Description

The Category class has only a limited number of unit test cases.

The primary set of tests are in

http://git.wikimedia.org/blob/pywikibot%2Fcore.git/c731cdb7b58adaf0f42c86bb838257af36e6e2f6/tests%2Fpage_tests.py#L567

However a few other related tests are located in other test modules.

The tests in page_tests should be moved to a new test module category_tests.py , and new basic tests added for at least the methods and attributes

  • sortKey
  • categoryinfo
  • members
  • subcategories
  • articles

(Methods copyTo and copyAndKeep are likely to be removed in the near future, and are essentially currently unsupported cruft)

Event Timeline

jayvdb raised the priority of this task from to Medium.
jayvdb updated the task description. (Show Details)
jayvdb changed Security from none to None.
jayvdb added subscribers: Unknown Object (MLST), jayvdb.

Change 180758 had a related patch set uploaded (by Unicodesnowman):
Add tests for the Category class

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

Patch-For-Review

Change 180758 merged by jenkins-bot:
Add tests for the Category class

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