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

TASK DESCRIPTION
  **List of steps to reproduce** (step by step, including full links if 
applicable):
  `C:\pwb\GIT\core>pwb -site:wowwiki:uk generate_family_file_tests`
  
  **What happens?**:
  
    tests: max_retries reduced from 15 to 1
    Generating family file from https://warcraft.fandom.com
    
    ==================================
    API url: https://wowpedia.fandom.com/api.php
    MediaWiki version: 1.33.3
    ==================================
    
    Determining other sites...
    Loading wikis...
      * en... in cache
    .
    ======================================================================
    ERROR: test_attributes_after_run (__main__.TestGenerateFamilyFiles) 
(url='https://wowpedia.fandom.com/wiki/$1')
    Test FamilyFileGenerator attributes after run().
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "C:\pwb\GIT\core\pywikibot\data\api.py", line 1523, in _json_loads
        result = response.json()
      File "C:\Python310\lib\site-packages\requests\models.py", line 910, in 
json
        return complexjson.loads(self.text, **kwargs)
      File "C:\Python310\lib\json\__init__.py", line 346, in loads
        return _default_decoder.decode(s)
      File "C:\Python310\lib\json\decoder.py", line 337, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "C:\Python310\lib\json\decoder.py", line 355, in raw_decode
        raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File ".\tests\generate_family_file_tests.py", line 88, in 
test_attributes_after_run
        self.assertEqual(site.lang, lang,
      File "C:\pwb\GIT\core\pywikibot\site\_apisite.py", line 980, in lang
        return self.siteinfo['lang']
      File "C:\pwb\GIT\core\pywikibot\site\_siteinfo.py", line 248, in 
__getitem__
        return self.get(key, False)  # caches and doesn't force it
      File "C:\pwb\GIT\core\pywikibot\site\_siteinfo.py", line 296, in get
        preloaded = self._get_general(key, expiry)
      File "C:\pwb\GIT\core\pywikibot\site\_siteinfo.py", line 237, in 
_get_general
        default_info = self._get_siteinfo(props, expiry)
      File "C:\pwb\GIT\core\pywikibot\site\_siteinfo.py", line 162, in 
_get_siteinfo
        data = request.submit()
      File "C:\pwb\GIT\core\pywikibot\data\api.py", line 2022, in submit
        self._data = super().submit()
      File "C:\pwb\GIT\core\pywikibot\data\api.py", line 1762, in submit
        result = self._json_loads(response)
      File "C:\pwb\GIT\core\pywikibot\data\api.py", line 1543, in _json_loads
        raise SiteDefinitionError('Invalid AutoFamily({!r})'
    pywikibot.exceptions.SiteDefinitionError: Invalid 
AutoFamily('wowpedia.fandom.com')
    
    ======================================================================
    FAIL: test_attributes_after_run (__main__.TestGenerateFamilyFiles) 
(test='Test whether default is loaded')
    Test FamilyFileGenerator attributes after run().
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File ".\tests\generate_family_file_tests.py", line 60, in 
test_attributes_after_run
        self.assertIn(self.site.lang, gen.wikis)
    AssertionError: 'uk' not found in {'en': 
MWSite("https://wowpedia.fandom.com/wiki/Wowpedia";)}
    
    ======================================================================
    FAIL: test_attributes_after_run (__main__.TestGenerateFamilyFiles) 
(test='Test element counts')
    Test FamilyFileGenerator attributes after run().
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File ".\tests\generate_family_file_tests.py", line 67, in 
test_attributes_after_run
        self.assertCountEqual(gen.prefixes, gen.wikis)
    AssertionError: Element counts were not equal:
    First has 1, Second has 0:  'uk'
    
    ----------------------------------------------------------------------
    Ran 2 tests in 1.990s
    
    FAILED (failures=2, errors=1)
    
    C:\pwb\GIT\core>
  
  https://github.com/wikimedia/pywikibot/runs/4415020315?check_suite_focus=true
  
  **Software version (if not a Wikimedia wiki), browser information, 
screenshots, other information, etc**:
  Pywikibot 7.0.0.dev0 and below

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

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

To: Xqt
Cc: Aklapper, Xqt, pywikibot-bugs-list
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to