jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1332478?usp=email )
Change subject: tests: Fix tabular-data claim target ......................................................................
tests: Fix tabular-data claim target
Construct the tabular-data claim target with WbTabularData instead of WbGeoShape so the .tab page is validated against the correct datatype. Remove expectedFailure now that the test uses its intended target.
Bug: T367327 Change-Id: I67f7720e462f499ab6abee042e763489ec45dec5 --- M tests/wikibase_edit_tests.py 1 file changed, 1 insertion(+), 2 deletions(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/tests/wikibase_edit_tests.py b/tests/wikibase_edit_tests.py index ae4518d..2ea0f73 100755 --- a/tests/wikibase_edit_tests.py +++ b/tests/wikibase_edit_tests.py @@ -377,7 +377,6 @@ claim = item.claims['P27199'][0] self.assertEqual(claim.getTarget(), target)
- @unittest.expectedFailure # T367327 def test_WbTabularData_edit(self) -> None: """Attempt adding a tabular-data with valid input.""" # Clean the slate in preparation for test. @@ -389,7 +388,7 @@ testsite, 'P30175', datatype='tabular-data') commons_site = pywikibot.Site('commons') page = pywikibot.Page(commons_site, 'Data:Bea.gov/GDP by state.tab') - target = pywikibot.WbGeoShape(page) + target = pywikibot.WbTabularData(page) claim.setTarget(target) item.addClaim(claim)
pywikibot-commits@lists.wikimedia.org