Page MenuHomePhabricator

Add tests for Wikibase Monolingual text
Closed, ResolvedPublic

Description

T85385: Implement "Monolingual text" in Pywikibot was merged without tests.

Tests are needed to remove corner cases in the new code, and prevent regressions in the future.

Event Timeline

jayvdb created this task.Jan 17 2016, 6:03 AM
jayvdb raised the priority of this task from to High.
jayvdb updated the task description. (Show Details)
jayvdb added subscribers: Lokal_Profil, gerritbot, Smalyshev and 6 others.
Restricted Application added a subscriber: pywikibot-bugs-list. · View Herald TranscriptJan 17 2016, 6:03 AM

I can take this one.

What I thought of so far was:

  • basic creation from a string
  • creation from a unicode string
  • equality
  • fromWikibase-toWikibase roundtrip

I would also add raising errors if either parameter is an empty string or not a basestring, then test that these are raised.

Anything else of the top of anyone's mind?

Change 264739 had a related patch set uploaded (by Lokal Profil):
Add tests for Wikibase Monolingual text

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

Change 264739 merged by jenkins-bot:
Add tests for Wikibase Monolingual text

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

jayvdb added a comment.EditedJan 19 2016, 12:51 AM

Also need an edit failure test (in tests/edit_failure_tests.py) for trying to save an invalid language; so we can document the error raised.

Lokal_Profil set Security to None.

Change 264935 had a related patch set uploaded (by Lokal Profil):
Add edit tests for WbMonolingualText

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

Change 264935 merged by jenkins-bot:
Add edit tests for WbMonolingualText

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

Lokal_Profil closed this task as Resolved.Jan 19 2016, 11:44 PM
Lokal_Profil claimed this task.
Lokal_Profil removed a project: Patch-For-Review.