====================================================================== FAIL: test_fully_qualified_NS0_family (tests.link_tests.TestFullyQualifiedNoLangFamilyExplicitLinkParser) Test ':wikidata:testwiki:Q6' on enwp is namespace 0. ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\projects\pywikibot-g4xqx\tests\link_tests.py", line 563, in test_fully_qualified_NS0_family self.assertEqual(link.site, self.get_site('test.wp')) AssertionError: APISite("test", "wikipedia") != APISite("test", "test") ====================================================================== FAIL: test_fully_qualified_NS1_family (tests.link_tests.TestFullyQualifiedNoLangFamilyExplicitLinkParser) Test ':wikidata:testwiki:Talk:Q6' on enwp is namespace 1. ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\projects\pywikibot-g4xqx\tests\link_tests.py", line 573, in test_fully_qualified_NS1_family self.assertEqual(link.site, self.get_site('test.wp')) AssertionError: APISite("test", "wikipedia") != APISite("test", "test") ====================================================================== FAIL: test_fully_qualified_NS0_family (tests.link_tests.TestFullyQualifiedNoLangFamilyImplicitLinkParser) Test 'wikidata:testwiki:Q6' on enwp is namespace 0. ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\projects\pywikibot-g4xqx\tests\link_tests.py", line 894, in test_fully_qualified_NS0_family self.assertEqual(link.site, pywikibot.Site('test', 'test')) AssertionError: APISite("test", "wikipedia") != APISite("test", "test") ====================================================================== FAIL: test_fully_qualified_NS1_family (tests.link_tests.TestFullyQualifiedNoLangFamilyImplicitLinkParser) Test 'wikidata:testwiki:Talk:Q6' on enwp is namespace 1. ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\projects\pywikibot-g4xqx\tests\link_tests.py", line 904, in test_fully_qualified_NS1_family self.assertEqual(link.site, pywikibot.Site('test', 'test')) AssertionError: APISite("test", "wikipedia") != APISite("test", "test") ---------------------------------------------------------------------- Ran 1785 tests in 1134.728s FAILED (failures=4, skipped=101, expected failures=15, unexpected successes=4)
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Goal | Xqt | T225591 Make Travis and Appveyor pass again | ||
Resolved | Dalba | T228375 Deprecate test_family and force wikipedia_family for test.wikipedia.org instead | |||
Resolved | BUG REPORT | Xqt | T228335 multiple matches order of _code_fam_from_url depends on Python version | ||
Resolved | Dalba | T228300 link_tests.py fails for missleading test wiki | |||
Resolved | Xqt | T347026 Drop support for Python 3.6 | |||
Resolved | Xqt | T347139 Show a warning if Pywikibot is running with Python 3.6 and below | |||
Resolved | Xqt | T350568 Provide some pywikibot usage statistics for Python3.6 and 3.7 |
Event Timeline
As noted in rPWBCa0a45d60c79726a934d2382823f54ee986837494 there are multiple matches for test wiki which should be solved:
I found two issues with this patch:
Site('test', 'wikipedia') == Site('test', 'test') # should be True
False
Site().fromDBName('testwiki') # should not warn
WARNING: Found multiple matches for URL \ "https://test.wikipedia.org/w/index.php": \ ('test', Family("test")), ('test', Family("wikipedia")) (use first) APISite("test", "test") Note that the first issue is not introduced by this patch (it already exists on master). The cause of the mentioned issues is that we have two separate family files that contain the same site. IOW, test.wikipeida.org is defined both in test_family.py and in wikipedia_family.py. It should be removed from one of them, but that sounds like a big breaking change and requires a deprecation period. This patch is not going to get into that matter.Bug: T225590
Change 524084 had a related patch set uploaded (by Dalba; owner: dalba):
[pywikibot/core@master] fix(BaseSite._cmpkey): compare sites by hostname
Change 524091 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] ignore test_family.py if resolving family from url
Change 524091 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] ignore test_family.py if resolving family from url
Change 524084 restored by Xqt:
fix(BaseSite._cmpkey): compare sites by hostname
Reason:
There are remaining tests using test, tesz
Change 524210 had a related patch set uploaded (by Dalba; owner: dalba):
[pywikibot/core@master] fix(test_family): deprecate test_family
Change 524210 merged by jenkins-bot:
[pywikibot/core@master] fix(test_family): deprecate test_family
Change 524084 abandoned by Xqt:
fix(BaseSite._cmpkey): compare sites by hostname
Reason:
test_family will be removed