XZise created this task.
XZise added a subscriber: XZise.
XZise added projects: Pywikibot-tests, pywikibot-core.
XZise changed Security from none to none.
TASK DESCRIPTION
The script tests in pywikibot won't all work if the editor variable in the
user-config.py is set. For example editarticle.py executes the editor I configured there.
The script tests set the environment variable `EDITOR`, but that doesn't work as
user-config.py is overriding it.
The workaround is to use something like `editor = os.environ.get('EDITOR',
'vim')` in the user-config.py, but this needs to be done by all testers manually.
And if `EDITOR` is already set on the system, this won't make it possible to change
that setting.
Somehow the script tests need to tell the called instance that this is a test (e.g.
`PYWIKIBOT2_TEST=1` ?) or we support multiple `-dir:…` parameters (although more in the
style that `-dir` is defined once and there are additionally multiple `-config`
parameters) and it's using the default config and then adds a test specific config
which then overwrites those values which need to be set to a specific value. But then we
need to add support for multiple directories and probably also support for "use
default".
TASK DETAIL
https://phabricator.wikimedia.org/T75868
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign
<username>.
To: XZise
Cc: pywikipedia-bugs, XZise, jayvdb