Page MenuHomePhabricator

Provide tests for Lexeme classes
Open, MediumPublic

Description

The following methods aren't covered yet:

LexemeForm

  • toJSON
  • _normalizeData
  • get
  • edit_elements

LexemeSubEntity

  • _ _init_ _
  • fromJSON
  • toJSON
  • on_lexeme
  • addClaim
  • removeClaims

LexemePage

  • _ _init_ _
  • toJSON
  • get
  • normalizeData
  • add_form
  • remove_form
  • mergeInto
  • isRedirectPage

Related Objects

Event Timeline

Xqt triaged this task as Medium priority.Apr 2 2022, 1:49 PM

Change 776292 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [doc] Add a Lexeme sample with doctest

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

Change 776292 merged by jenkins-bot:

[pywikibot/core@master] [doc] Add a Lexeme sample with doctest

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

I am thinking of writing tests using unittest module. Will that be alright?

Yes, Pywikibot already uses that library.

I have to write these tests in wikibase_tests.py, right?

Yes, or wikibase_edit_tests.py, if you plan testing write actions.

Please upload your changes as a patch for review to Gerrit, where the code can be reviewed.