Page MenuHomePhabricator

test_datatypes is failing on wikidata family
Closed, ResolvedPublic

Description

https://travis-ci.org/wikimedia/pywikibot-core/jobs/210458590
https://travis-ci.org/wikimedia/pywikibot-core/jobs/210458589

____________________ WikibaseKnownTypesTests.test_datatypes ____________________

self = <tests.paraminfo_tests.WikibaseKnownTypesTests testMethod=test_datatypes>

    def test_datatypes(self):

        """Test known datatypes."""

        unsupported = set(['wikibase-property'])

        known = set(Property.types) | unsupported

>       self._check_param_values(self.repo, 'wbformatvalue', 'datatype', known)

tests/paraminfo_tests.py:229: 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tests/paraminfo_tests.py:46: in _check_param_values

    self.assertCountEqual(expected, values)

E   AssertionError: Element counts were not equal:

E   First has 0, Second has 1:  'geo-shape'

Event Timeline

Dalba removed Dalba as the assignee of this task.Mar 13 2017, 3:10 PM

It's been added recently: T57549. The test only fails on test.wikidata.org and test.wikipedia.org (which itself uses test.wikidata). Seems that it's not been deployed on production site yet.

Note that the very same test will fail IF we implement geo-shapes but this time for Wikidata properties (since the datatype has not yet been deployed there). We might want to change the test to fail on missing data types but not on extra ones (which also shouldn't affect using pywikibot on that site).

See https://travis-ci.org/magul/pywikibot-core/jobs/219187426

Change 347336 had a related patch set uploaded (by Lokal Profil):
[pywikibot/core@master] Only require that all encuntered data types are known

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

Change 347336 merged by jenkins-bot:
[pywikibot/core@master] Only require that all encuntered data types are known

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

Lokal_Profil claimed this task.