Page MenuHomePhabricator

script_tests.py does not respect -lang/-family settings
Closed, ResolvedPublicBUG REPORT

Description

pwb.py wrapper is able to handle global args like -lang and -family settings. The doc says:

"""
    python pwb.py <pwb options> <name_of_script> <options>

Currently <pwb options> are global options. This can be used for tests
to set the default site like (see T216825):

    python pwb.py -lang:de bot_tests -v

"""

But global option setting is ignored if running script_test.py because their own environment is executed with pwb_execute function

Details

Related Changes in Gerrit:

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald Transcript
Xqt triaged this task as Low priority.Apr 12 2020, 12:52 PM
Xqt changed the subtype of this task from "Task" to "Bug Report".
Xqt changed the task status from Open to In Progress.Aug 24 2025, 6:40 PM
Xqt claimed this task.

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

[pywikibot/core@master] tests: enable global options in script_tests

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

Change #1181291 merged by jenkins-bot:

[pywikibot/core@master] tests: enable global options in script_tests

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