Page MenuHomePhabricator

EventStreamsPageGeneratorTestCase does not stop for wikisource:beta site
Closed, ResolvedPublicBUG REPORT

Description

py -3.13 -m pwb -site:wikisource:beta pwb pagegenerators_tests -v EventStreamsPageGeneratorTestCase
never stops because the corresponding site is not found within the event stream. wikisource:beta is part of configured within the family file;

"""Family module for Wikisource."""
from __future__ import annotations

from pywikibot import family
from pywikibot.tools import classproperty


# The Wikimedia family that is known as Wikisource
class Family(family.SubdomainFamily, family.WikimediaFamily):

    """Family class for Wikisource."""

    name = 'wikisource'

    closed_wikis = [
        # https://noc.wikimedia.org/conf/highlight.php?file=dblists/closed.dblist
        'ang', 'ht',
    ]
    removed_wikis = [
        # https://noc.wikimedia.org/conf/highlight.php?file=dblists/deleted.dblist
        'tokipona',
    ]

    codes = {
        'ar', 'as', 'az', 'ban', 'bcl', 'be', 'bg', 'bn', 'br', 'bs', 'ca',
        'cs', 'cy', 'da', 'de', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'fi',
        'fo', 'fr', 'gl', 'gu', 'he', 'hi', 'hr', 'hu', 'hy', 'id', 'is', 'it',
        'ja', 'jv', 'ka', 'kn', 'ko', 'la', 'li', 'lij', 'lt', 'mad', 'min',
        'mk', 'ml', 'mr', 'ms', 'mul', 'my', 'nap', 'nl', 'no', 'or', 'pa',
        'pl', 'pms', 'pt', 'ro', 'ru', 'sa', 'sah', 'sk', 'sl', 'sr', 'su',
        'sv', 'ta', 'tcy', 'te', 'th', 'tl', 'tr', 'uk', 'ur', 'vec', 'vi',
        'wa', 'yi', 'zh', 'zh-min-nan',
    }

    # Sites we want to edit but not count as real languages
    test_codes = ['beta']

Whereas
py -3.13 -m pwb -site:wsbeta:en pwb pagegenerators_tests -v EventStreamsPageGeneratorTestCase
works if the family file was created with generate_family_file script as:

"""
This family file was auto-generated by generate_family_file.py script.

Configuration parameters:
  url = http://en.wikisource.beta.wmcloud.org/
  name = wsbeta

Please do not commit this to the Git repository!
"""
from pywikibot import family


class Family(family.Family):  # noqa: D101

    name = 'wsbeta'
    langs = {
        'en': 'en.wikisource.beta.wmcloud.org',
    }

    def scriptpath(self, code):
        return {
            'en': '/w',
        }[code]

    def protocol(self, code):
        return {
            'en': 'https',
        }[code]

Event Timeline

Xqt triaged this task as High priority.Sun, May 17, 2:02 PM
Xqt changed the subtype of this task from "Task" to "Bug Report".
Xqt moved this task from Backlog to Test failures on the Pywikibot-tests board.

Change #1288236 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] tests: Skip EventStreamsPageGeneratorTestCase for wikisource:beta

https://gerrit.wikimedia.org/r/1288236

Change #1288236 merged by Xqt:

[pywikibot/core@master] tests: Skip EventStreamsPageGeneratorTestCase for wikisource:beta

https://gerrit.wikimedia.org/r/1288236

Change #1289305 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] override all Sites of test_codes in RecentChangesTestCase

https://gerrit.wikimedia.org/r/1289305

Xqt changed the task status from Open to In Progress.Tue, May 19, 10:33 AM
Xqt claimed this task.

Change #1289305 merged by Xqt:

[pywikibot/core@master] [bugfix] override all Sites of test_codes in RecentChangesTestCase

https://gerrit.wikimedia.org/r/1289305