Page MenuHomePhabricator

test_own_client_wikidatatest fails for wikidata:test
Closed, ResolvedPublicBUG REPORT

Description

test_own_client_wikidatatest of wikibase_tests.TestOwnClient fails for wikidata:test after rPWBC098fdae

__________________ TestOwnClient.test_own_client_wikidatatest __________________

self = <tests.wikibase_tests.TestOwnClient testMethod=test_own_client_wikidatatest>

    def wrapped_method(self):
        sitedata = self.sites[key]
        self.site_key = key
        self.family = sitedata['family']
        self.code = sitedata['code']
        self.site = sitedata['site']
>       func(self, key)

tests/aspects.py:762: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/wikibase_tests.py:2096: in test_own_client
    item = ItemPage.fromPage(page)
pywikibot/page.py:4463: in fromPage
    if not lazy_load and not i.exists():
pywikibot/page.py:3901: in exists
    self.get(get_redirect=True)
pywikibot/page.py:4526: in get
    self.sitelinks[dbname] = self._content['sitelinks'][dbname]
pywikibot/page.py:6431: in __setitem__
    val = SiteLink.fromJSON(val, self.repo)
pywikibot/page.py:6370: in fromJSON
    sl = cls(data['title'], data['site'])
pywikibot/page.py:6314: in __init__
    site, namespace, title = SiteLink._parse_namespace(title, site)
pywikibot/page.py:6338: in _parse_namespace
    site = pywikibot.site.APISite.fromDBName(site)
pywikibot/site.py:1885: in fromDBName
    return cls(site['code'], site['code'])
pywikibot/site.py:1833: in __init__
    BaseSite.__init__(self, code, fam, user, sysop)
pywikibot/site.py:746: in __init__
    self.__family = pywikibot.family.Family.load(fam)
pywikibot/tools/__init__.py:1738: in wrapper
    return obj(*__args, **__kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

fam = 'testwikidata'

    @staticmethod
    @deprecated_args(fatal=None)
    def load(fam=None):
        """Import the named family.
    
            @param fam: family name (if omitted, uses the configured default)
            @type fam: str
            @return: a Family instance configured for the named family.
            @raises UnknownFamily: family not known
            """
        if fam is None:
            fam = config.family
    
        assert all(x in NAME_CHARACTERS for x in fam), \
            'Name of family %s must be ASCII characters and digits' % fam
    
        if fam in Family._families:
            return Family._families[fam]
    
        if fam in config.family_files:
            family_file = config.family_files[fam]
    
            if family_file.startswith(('http://', 'https://')):
                myfamily = AutoFamily(fam, family_file)
                Family._families[fam] = myfamily
                return Family._families[fam]
        else:
>           raise UnknownFamily('Family %s does not exist' % fam)
E           pywikibot.exceptions.UnknownFamily: Family testwikidata does not exist

pywikibot/family.py:1009: UnknownFamily

See: https://api.travis-ci.org/v3/job/544238767/log.txt

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald Transcript
Xqt triaged this task as High priority.Jun 12 2019, 8:00 AM
Xqt changed the subtype of this task from "Task" to "Bug Report".Jun 12 2019, 8:05 AM

Change 516782 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Fix APISite.fromDBName for several dbnames

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

This comment was removed by Dalba.

Change 523949 had a related patch set uploaded (by Dalba; owner: dalba):
[pywikibot/core@master] fix(APISite.fromDBName): work for all known dbnames

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

Change 516782 abandoned by Xqt:
[bugfix] Fix APISite.fromDBName for several dbnames

Reason:
In favour of https://gerrit.wikimedia.org/r/#/c/pywikibot/core/ /523949/

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

Change 523949 merged by jenkins-bot:
[pywikibot/core@master] fix(APISite.fromDBName): work for all known dbnames

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

Change 516782 restored by Xqt:
[bugfix] Fix APISite.fromDBName for several dbnames

Reason:
for tests

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

Change 523964 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [tests] Additional tests for APISite.fromDBName

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

Change 516782 abandoned by Xqt:
[bugfix] Fix APISite.fromDBName for several dbnames

Reason:
Accidantly I made a new patch

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

Change 523964 merged by jenkins-bot:
[pywikibot/core@master] [tests] Additional tests for APISite.fromDBName

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