jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1345993?usp=email )
Change subject: tests: Use a Wikidata globe item in coordinate edit test
......................................................................
tests: Use a Wikidata globe item in coordinate edit test
Test Wikidata requires globe URIs from production Wikidata. Passing the
edited test item as the globe produces a test.wikidata.org URI which
the API rejects.
Use Earth (Q2) from production Wikidata as the globe while keeping the
claim on the test repository. Preserve ItemPage globe coverage and the
explicit precision.
Bug: T439356
Change-Id: Ib1d259f4570e59b5b1888d786cf9bbbf8127359f
---
M tests/wikibase_edit_tests.py
1 file changed, 3 insertions(+), 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 6de93a6..cb5df66 100755
--- a/tests/wikibase_edit_tests.py
+++ b/tests/wikibase_edit_tests.py
@@ -291,17 +291,18 @@
claim = item.claims['P271'][0]
self.assertEqual(claim.getTarget(), target)
- @unittest.expectedFailure # T439356
def test_Coordinate_edit(self) -> None:
"""Attempt adding a Coordinate with globe set via item."""
testsite = self.get_repo()
item = self._clean_item(testsite, 'P20480')
+ # Test Wikidata requires globe items from production Wikidata.
+ globe = pywikibot.ItemPage(pywikibot.Site('wikidata'), 'Q2')
# set new claim
claim = pywikibot.page.Claim(testsite, 'P20480',
datatype='globe-coordinate')
target = pywikibot.Coordinate(site=testsite, lat=12.0, lon=13.0,
- precision=0.1, globe_item=item)
+ precision=0.1, globe_item=globe)
claim.setTarget(target)
item.addClaim(claim)
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1345993?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ib1d259f4570e59b5b1888d786cf9bbbf8127359f
Gerrit-Change-Number: 1345993
Gerrit-PatchSet: 3
Gerrit-Owner: Mahveotm <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]