Page MenuHomePhabricator

site_detect_tests.APIDisabledTestCase fails
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):
pwb site_detect_tests -v APIDisabledTestCase

What happens?:

The test fails, the api is available for linuxquestiony, e.g.
https://wiki.linuxquestions.org/api.php?action=query&meta=siteinfo&siprop=general%7Cnamespaces%7Cnamespacealiases%7Cstatistics

tests: max_retries reduced from 15 to 1
test_linuxquestions (__main__.APIDisabledTestCase)
Test detection of MediaWiki sites for wiki.linuxquestions.org. ... FAIL

======================================================================
FAIL: test_linuxquestions (__main__.APIDisabledTestCase)
Test detection of MediaWiki sites for wiki.linuxquestions.org.
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".\tests\site_detect_tests.py", line 185, in test_linuxquestions
    self.assertNoSite('http://wiki.linuxquestions.org/wiki/$1')
  File ".\tests\site_detect_tests.py", line 47, in assertNoSite
    with self.assertRaises((AttributeError,
AssertionError: (<class 'AttributeError'>, <class 'RuntimeError'>, <class 'pywikibot.exceptions.ServerError'>, <class 'requests.exceptions.ConnectionError'>, <class 'requests.exceptions.Timeout'>, <class 'requests.exceptions.TooManyRedirects'>) not raised

----------------------------------------------------------------------
Ran 1 test in 1.529s

Event Timeline

Xqt triaged this task as High priority.Dec 15 2021, 12:30 PM

Change 747505 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] Remove site_detect_tests.APIDisabledTestCase

https://gerrit.wikimedia.org/r/747505

Change 747505 merged by jenkins-bot:

[pywikibot/core@master] [tests] Remove site_detect_tests.APIDisabledTestCase

https://gerrit.wikimedia.org/r/747505

Xqt claimed this task.