List of steps to reproduce (step by step, including full links if applicable):
run for example:
C:\pwb\GIT\core>pwb -site:wikihow:en wikibase_tests -v TestWbGeoShapeNonDry.test_WbGeoShape_WbRepresentation_methods
C:\pwb\GIT\core>pwb -site:wowwiki:en wikibase_tests -v TestWbGeoShapeNonDry.test_WbGeoShape_WbRepresentation_methods
other wikibase tests fail too, see
https://github.com/xqt/pwb/runs/4400763603?check_suite_focus=true#step:6:4573
What happens?:
tests: max_retries reduced from 15 to 1
test_WbGeoShape_WbRepresentation_methods (__main__.TestWbGeoShapeNonDry)
Test inherited or extended methods from _WbRepresentation. ...
======================================================================
ERROR: test_WbGeoShape_WbRepresentation_methods (__main__.TestWbGeoShapeNonDry)
Test inherited or extended methods from _WbRepresentation.
----------------------------------------------------------------------
Traceback (most recent call last):
File ".\tests\wikibase_tests.py", line 647, in test_WbGeoShape_WbRepresentation_methods
q = pywikibot.WbGeoShape(self.page)
File "C:\pwb\GIT\core\pywikibot\__init__.py", line 949, in __init__
specifics = type(self)._get_type_specifics(site)
File "C:\pwb\GIT\core\pywikibot\__init__.py", line 1009, in _get_type_specifics
'data_site': cls._get_data_site(site)
File "C:\pwb\GIT\core\pywikibot\__init__.py", line 995, in _get_data_site
return site.geo_shape_repository()
AttributeError: 'NoneType' object has no attribute 'geo_shape_repository'
----------------------------------------------------------------------
Ran 1 test in 0.750s
FAILED (errors=1)
C:\pwb\GIT\core>What should have happened instead?:
The test should pass. The problem might be in pywikibot.init line 946 (_WbDataPage.__init__):
which either uses the given site or the default site but ignores the page's site:
site = site or Site().data_repository()
and wikihow or wowwiki has no data_repository. Probable the data_reopsitory of Page.site should be used instead of the default Site()'s data_repository
Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
Pywikibot 7.0.0.dev0 and earlier