Page MenuHomePhabricator

test_commons of site_tests.TestSingleCodeFamilySite is failing with KeyError
Closed, ResolvedPublic

Description

test_commons of site_tests.TestSingleCodeFamilySite. is failing with KeyError:

======================================================================
ERROR: test_commons (tests.site_tests.TestSingleCodeFamilySite)
Test Wikimedia Commons.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/wikimedia/pywikibot/tests/site_tests.py", line 3488, in test_commons
    self.assertEqual(site.family.hostname('en'), 'commons.wikimedia.org')
  File "/home/travis/build/wikimedia/pywikibot/pywikibot/family.py", line 1126, in hostname
    return self.langs[code]
KeyError: u'en'

----------------------------------------------------------------------

I am pretty sure that this failure was introduced with beta commons support of T140516. But it is very strange that the the test wasn't hit the last 17 month and occured without code change, see https://travis-ci.org/wikimedia/pywikibot/builds or https://ci.appveyor.com/project/Ladsgroup/pywikibot-g4xqx/builds/21627989/job/8jibkx3hojonyjdx

Details

Related Gerrit Patches:

Event Timeline

Xqt created this task.Jan 11 2019, 8:03 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJan 11 2019, 8:04 AM
Xqt renamed this task from test_commons of site_tests.TestSingleCodeFamilySite. is failing with KeyError to test_commons of site_tests.TestSingleCodeFamilySite is failing with KeyError.Jan 11 2019, 8:04 AM
Xqt triaged this task as High priority.

Isn't this still the same years old issue? Tests spontaneously unregularly generating nonexistent languages for families? It seems similar at least

-> No, this seems worse

Change 484006 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [tests] Fix broken tests for commons

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

Xqt updated the task description. (Show Details)Jan 15 2019, 10:59 AM

Change 484006 merged by jenkins-bot:
[pywikibot/core@master] [tests] Fix broken tests for commons

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

D3r1ck01 closed this task as Resolved.Jan 15 2019, 5:09 PM
D3r1ck01 assigned this task to Xqt.
D3r1ck01 added a subscriber: D3r1ck01.

Thanks for working on this @Xqt. :)