atagar reopened this task as "Open".
atagar added a comment.

  Hi Xqt. Sorry to reopen but changing my user-config.py in the way mentioned 
above surfaced a new test failure and I think this one is legitimate...
  
    % python -m tests.page_tests TestShortLink
    ======================================================================
    ERROR: test_create_short_link (__main__.TestShortLink)
    Test create_short_link function.
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/atagar/Desktop/pywikibot/pywikibot/login.py", line 110, in 
__init__
        user = code_to_usr.get(site.code) or code_to_usr['*']
    KeyError: '*'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/atagar/Desktop/pywikibot/tests/page_tests.py", line 1267, in 
test_create_short_link
        meta.login()
      File "/home/atagar/Desktop/pywikibot/pywikibot/site/_apisite.py", line 
389, in login
        login_manager = api.LoginManager(site=self, user=self.username())
      File "/home/atagar/Desktop/pywikibot/pywikibot/tools/_deprecate.py", line 
404, in wrapper
        return obj(*__args, **__kw)
      File "/home/atagar/Desktop/pywikibot/pywikibot/login.py", line 112, in 
__init__
        raise NoUsernameError(
    pywikibot.exceptions.NoUsernameError: ERROR: username for meta:meta is 
undefined.
    If you have a username for that site, please add a line to user-config.py 
as follows:
    usernames['meta']['meta'] = 'myUsername'
  
  The problem looks to be that the test is configured to only run the user has 
'wikipedia:test' login credentials, but attempts to log into 'meta:meta' 
instead. I'll shoot you a patch in a sec.

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

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

To: atagar
Cc: Xqt, Aklapper, pywikibot-bugs-list, atagar, Biggs657, Lalamarie69, 
Jyoo1011, JohnsonLee01, Juan90264, SHEKH, Dijkstra, Alter-paule, Beast1978, 
Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, 
Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, 
Lewizho99, Mdupont, JJMC89, Maathavan, 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