jenkins-bot has submitted this change and it was merged.
Change subject: Add math test to wikibase_tests.py
......................................................................
Add math test to wikibase_tests.py
A follow-up to Ia7345072a1be00920dac37edd15204137222e6a8 now that
there are math properties on Wikidata.
Change-Id: I11608ff50d7cf63c8a0bb994983b16f0a6e17d9f
---
M tests/wikibase_tests.py
1 file changed, 8 insertions(+), 0 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index 4ae1542..2c841ba 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -661,6 +661,14 @@
claim.setTarget(target)
self.assertEqual(claim.target, target)
+ def test_set_math(self):
+ """Test setting claim of math type."""
+ wikidata = self.get_repo()
+ claim = pywikibot.Claim(wikidata, 'P2535')
+ self.assertEqual(claim.type, 'math')
+ claim.setTarget('a^2 + b^2 = c^2')
+ self.assertEqual(claim.target, 'a^2 + b^2 = c^2')
+
def test_set_date(self):
"""Test setting claim of time type."""
wikidata = self.get_repo()
--
To view, visit
https://gerrit.wikimedia.org/r/270988
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I11608ff50d7cf63c8a0bb994983b16f0a6e17d9f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil <lokal.profil(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>