List of steps to reproduce:
- switch/checkout to rPWBCa2b9ddae
- add pywikibot.tools.ModuleDeprecationWrapper(__name__) at the bottom of bot.py
- run pwb replacebot_tests -v TestReplacementsMain
What happens?:
All 12 tests fails. As the exception shows the pywikibot.bot.ui is not a buffered UI but a Win32UI in Windows machines and I guess an UnixUI for Linux.
C:\pwb\GIT\core>pwb replacebot_tests -v TestReplacementsMain
tests: max_retries reduced from 15 to 1
EEEEEEEEEEEE
======================================================================
ERROR: test_cmd_and_fix (__main__.TestReplacementsMain)
Test command line and fix replacements together.
----------------------------------------------------------------------
Traceback (most recent call last):
File ".\tests\replacebot_tests.py", line 74, in setUp
pywikibot.bot.ui.clear()
AttributeError: 'Win32UI' object has no attribute 'clear'
----------------------------------------------------------------------
… < trunctated >
----------------------------------------------------------------------
Ran 12 tests in 2.551s
FAILED (errors=12)
C:\pwb\GIT\core>If using set_interface('buffer') the line above, tests will still fail with wrapper (but pass without) due to an empty buffer.
What should have happened instead?:
without ModuleDeprecationWrapper tests passes as expected:
C:\pwb\GIT\core>pwb replacebot_tests TestReplacementsMain tests: max_retries reduced from 15 to 1 ............ ---------------------------------------------------------------------- Ran 12 tests in 2.893s OK C:\pwb\GIT\core>
The previous commit rPWBC1607677a works fine with and without ModuleDeprecationWrapper