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

TASK DESCRIPTION
  **List of steps to reproduce** (step by step, including full links if 
applicable):
  Run `pwb pagegenerators_tests -v PetScanGeneratorTestCase.test_petscan`
  
  **What happens?**:
  
    ======================================================================
    ERROR: test_petscan (__main__.PetScanPageGeneratorTestCase)
    Test PetScanPageGenerator.
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File ".\tests\pagegenerators_tests.py", line 376, in test_petscan
        self.assertPageTitlesEqual(gen, titles=(
      File "D:\pwb\GIT\core\tests\aspects.py", line 246, in 
assertPageTitlesEqual
        gen_titles = self._get_gen_titles(gen, len(titles), site)
      File "D:\pwb\GIT\core\tests\aspects.py", line 180, in _get_gen_titles
        gen_pages = self._get_gen_pages(gen, count, site)
      File "D:\pwb\GIT\core\tests\aspects.py", line 163, in _get_gen_pages
        gen_pages = list(gen)
      File "D:\pwb\GIT\core\pywikibot\pagegenerators.py", line 3087, in __iter__
        for raw_page in self.query():
      File "D:\pwb\GIT\core\pywikibot\pagegenerators.py", line 3083, in query
        raw_pages = j['*'][0]['a']['*']
    KeyError: '*'
    
    ----------------------------------------------------------------------
    Ran 1 test in 2.933s
    
    FAILED (errors=1)
  
  **What should have happened instead?**:
  Instead of a unspecific KeyError an Error should be raised with additional 
informations. The json result contains an error in such case like
  `{'error': 'No result for source categories'} `.
  
  **Software version (if not a Wikimedia wiki), browser information, 
screenshots, other information, etc.**:

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

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

To: Xqt
Cc: Aklapper, Xqt, pywikibot-bugs-list, 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