Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  **List of steps to reproduce**:
  
  1. switch/checkout to rPWBCa2b9ddae 
<https://phabricator.wikimedia.org/rPWBCa2b9ddaee746ad288d1b21e6b30d0b9ce035a1e9>
  2. add `pywikibot.tools.ModuleDeprecationWrapper(__name__)` at the bottom of 
bot.py
  3. 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>
  
  **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 
<https://phabricator.wikimedia.org/rPWBC1607677aff2ffcd3203221e4bfbabd9427e0956f>
 works fine with and without ModuleDeprecationWrapper

TASK DETAIL
  https://phabricator.wikimedia.org/T286348

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Aklapper, pywikibot-bugs-list, atagar, Xqt, Jyoo1011, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to