Page MenuHomePhabricator

wikibase edit tests fail loading family calendarmodel
Open, LowPublic

Description

This should be coming through from the wikidata family file.

======================================================================
ERROR: test_add_claim_with_qualifier (tests.wikibase_edit_tests.TestWikibaseWriteGeneral)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/wikibase_edit_tests.py", line 78, in test_add_claim_with_qualifier
    end_date.setTarget(pywikibot.WbTime(year=2012))
  File "./pywikibot/__init__.py", line 391, in __init__
    calendarmodel = site.calendarmodel()
AttributeError: 'NoneType' object has no attribute 'calendarmodel'

Event Timeline

jayvdb created this task.Jun 21 2015, 11:10 PM
jayvdb raised the priority of this task from to Unbreak Now!.
jayvdb updated the task description. (Show Details)
jayvdb added a subscriber: jayvdb.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJun 21 2015, 11:10 PM
jayvdb renamed this task from wikibase edit tests fail to wikibase edit tests fail loading family calendarmodel.Jun 21 2015, 11:11 PM
jayvdb set Security to None.
jayvdb lowered the priority of this task from Unbreak Now! to Low.Jun 22 2015, 6:54 AM

The problem is the test case dosent create WbTime with a site, so it uses the default site, which was not wikidata.

XZise added a subscriber: XZise.Jun 22 2015, 10:26 AM

Okay this is either a simple bug in our testing environment or a larger issue in the general framework, because the WbTime could know the site if it was associated with the claim on creation as it could use the claim's site. As a fix/workaround the site could be specified in the test itself and it would work independently from the configured one.

Okay this is either a simple bug in our testing environment or a larger issue in the general framework, because the WbTime could know the site if it was associated with the claim on creation as it could use the claim's site.

I like this idea.

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 22 2017, 10:16 AM