====================================================================== ERROR: test_attributes_after_run (__main__.TestGenerateFamilyFiles) (lang='hz') ---------------------------------------------------------------------- Traceback (most recent call last): File ".\tests\generate_family_files_tests.py", line 66, in test_attributes_aft er_run site = Site(url=lang['url']) File "C:\pwb\GIT\core\pywikibot\__init__.py", line 1229, in Site code, fam = _code_fam_from_url(url) File "C:\pwb\GIT\core\pywikibot\__init__.py", line 1186, in _code_fam_from_url raise SiteDefinitionError("Unknown URL '{0}'.".format(url)) pywikibot.exceptions.SiteDefinitionError: Unknown URL 'https://hz.wikipedia.org/ wiki/$1'. ---------------------------------------------------------------------- Ran 1 test in 4.601s FAILED (errors=1)
Either the site should be created or the creation should be skipped in tests like in generate_family_files_tests (see above).
I propose to allow creating a site object because we can also do it in the usual way:
>>> import pwb, pywikibot as py >>> s = py.Site('hz') >>> s ClosedSite("hz", "wikipedia") >>>