valhallasw added a comment.
Directly running
PYTHONPATH=. python tests/ui_tests.py
also doesn't work for me, so there's probably something else that loads pywikibot before everything is monkey-patched.
Obvious fix would be to not monkeypatch, and to shell out to a new interpreter instead...
TASK DETAIL https://phabricator.wikimedia.org/T76248
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: valhallasw Cc: pywikipedia-bugs, valhallasw, XZise, jayvdb