| rafidaslam added a comment. |
In https://travis-ci.org/refeed/pywikibot/jobs/324761540
____________ TestFactoryGeneratorWikibase.test_searchitem_language _____________
self = <tests.pagegenerators_tests.TestFactoryGeneratorWikibase testMethod=test_searchitem_language>
def test_searchitem_language(self):
"""Test -searchitem with custom language specified."""
gf = pagegenerators.GeneratorFactory(site=self.site)
gf.handleArg('-searchitem:pl:abc')
gf.handleArg('-limit:1')
gen = gf.getCombinedGenerator()
self.assertIsNotNone(gen)
# ABC
page1 = next(gen)
> self.assertEqual(page1.title(), 'Q287078')
E AssertionError: u'Q169889' != u'Q287078'
E - Q169889
E + Q287078
tests/pagegenerators_tests.py:1229: AssertionError
------------------------------ Captured log call -------------------------------
connectionpool.py 396 DEBUG https://www.wikidata.org:443 "GET /w/api.php?search=abc&maxlag=5&language=pl&format=json&continue=0&action="" HTTP/1.1" 200 665This is what I got from performing a GET request to that api endpoint:
{"searchinfo":{"search":"abc"},"search":[{"repository":"","id":"Q169889","concepturi":"http://www.wikidata.org/entity/Q169889","title":"Q169889","pageid":170288,"url":"//www.wikidata.org/wiki/Q169889","label":"American Broadcasting Company","description":"American broadcast television network owned by The Walt Disney Company through Disney-ABC Television Group","match":{"type":"alias","language":"pl","text":"ABC Network"},"aliases":["ABC Network"]},{"repository":"","id":"Q781365","concepturi":"http://www.wikidata.org/entity/Q781365","title":"Q781365","pageid":734387,"url":"//www.wikidata.org/wiki/Q781365","label":"Australian Broadcasting Corporation","description":"Australia's state-owned and funded national public radio and TV-broadcaster","match":{"type":"alias","language":"en","text":"ABC"},"aliases":["ABC"]},{"repository":"","id":"Q287078","concepturi":"http://www.wikidata.org/entity/Q287078","title":"Q287078","pageid":277521,"url":"//www.wikidata.org/wiki/Q287078","label":"ABC","description":"English New Romantic band","match":{"type":"label","language":"pl","text":"ABC"}},{"repository":"","id":"Q287076","concepturi":"http://www.wikidata.org/entity/Q287076","title":"Q287076","pageid":277519,"url":"//www.wikidata.org/wiki/Q287076","label":"ABC","description":"Spanish newspaper","match":{"type":"label","language":"pl","text":"ABC (dziennik hiszpa\u0144ski)"},"aliases":["ABC (dziennik hiszpa\u0144ski)"]},{"repository":"","id":"Q1057802","concepturi":"http://www.wikidata.org/entity/Q1057802","title":"Q1057802","pageid":1006628,"url":"//www.wikidata.org/wiki/Q1057802","label":"ABC","description":"programming language","match":{"type":"label","language":"pl","text":"ABC"}},{"repository":"","id":"Q3600480","concepturi":"http://www.wikidata.org/entity/Q3600480","title":"Q3600480","pageid":3428721,"url":"//www.wikidata.org/wiki/Q3600480","label":"ABC","description":"first Australian public television network","match":{"type":"label","language":"en","text":"ABC"}},{"repository":"","id":"Q265653","concepturi":"http://www.wikidata.org/entity/Q265653","title":"Q265653","pageid":257480,"url":"//www.wikidata.org/wiki/Q265653","label":"CBRN defense","description":"CBRN","match":{"type":"label","language":"pl","text":"ABC"},"aliases":["ABC"]}],"search-continue":7,"success":1}The order of list members in that response has changed.. I think that's why we got Q169889 in Travis. But mysteriously the test passed in my local environment..
TASK DETAIL
EMAIL PREFERENCES
To: rafidaslam
Cc: Aklapper, pywikibot-bugs-list, rafidaslam, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy
Cc: Aklapper, pywikibot-bugs-list, rafidaslam, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
