jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/524091 )
Change subject: [bugfix] ignore test_family.py if resolving family from url
......................................................................
[bugfix] ignore test_family.py if resolving family from url
test.wikipedia.org has it's own family file but this family is available
in wikipedia_family too. To prevent multiple matches in _code_fam_from_url
when resolve
test.wikipedia.org url ignore test_family and
use wikpedia_family instead
Fix tests accordingly.
Bug: T228300
Change-Id: I1f36d4e7bb3261dcca0d0298bfb1992e48e89a1c
---
M pywikibot/families/test_family.py
M tests/site_tests.py
2 files changed, 4 insertions(+), 1 deletion(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/families/test_family.py b/pywikibot/families/test_family.py
index 0e89716..a1ea3e0 100644
--- a/pywikibot/families/test_family.py
+++ b/pywikibot/families/test_family.py
@@ -18,3 +18,6 @@
name = 'test'
domain = 'test.wikipedia.org'
interwiki_forward = 'wikipedia'
+
+ # 'test' family should resolve to be in the 'wikipedia' family
+ _ignore_from_url = True
diff --git a/tests/site_tests.py b/tests/site_tests.py
index 650a77d..91204f2 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -330,7 +330,7 @@
['commonswiki', ('commons', 'commons')],
['wikidatawiki', ('wikidata', 'wikidata')],
['testwikidatawiki', ('test', 'wikidata')],
- ['testwiki', ('test', 'test')], # see T225729
+ ['testwiki', ('test', 'wikipedia')], # see T225729,
T228300
['test2wiki', ('test2', 'wikipedia')], # see
T225729
['sourceswiki', ('mul', 'wikisource')], # see
T226960
]
--
To view, visit
https://gerrit.wikimedia.org/r/524091
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1f36d4e7bb3261dcca0d0298bfb1992e48e89a1c
Gerrit-Change-Number: 524091
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)