Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
======================================================================
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")
>>>
TASK DETAIL
https://phabricator.wikimedia.org/T233487
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Aklapper, pywikibot-bugs-list, Xqt, Viztor, DannyS712, Wenyi, Tbscho, MayS,
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Dalba,
Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs