Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
test_format of dry_api_tests.ParamInfoDictTests is not dry but calls
paraminfo action:
17:08:14 =================================== FAILURES
===================================
17:08:14 ________________________ ParamInfoDictTests.test_format
________________________
17:08:14
17:08:14 self = <tests.dry_api_tests.ParamInfoDictTests
testMethod=test_format>
17:08:14
17:08:14 def test_format(self):
17:08:14 """Test using a dummy formatted in the new modules-only
mode."""
17:08:14 pi = self.get_site()._paraminfo
17:08:14 self.assertIn('query+info', pi._paraminfo)
17:08:14 self.assertIn('query+tokens', pi._paraminfo)
17:08:14 > self.assertIn('edit', pi)
17:08:14
17:08:14 tests/dry_api_tests.py:405:
17:08:14 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _
17:08:14 pywikibot/data/api/_paraminfo.py:326: in __contains__
17:08:14 self[key]
17:08:14 pywikibot/data/api/_paraminfo.py:316: in __getitem__
17:08:14 self.fetch({key})
17:08:14 pywikibot/data/api/_paraminfo.py:139: in fetch
17:08:14 self._fetch(modules)
17:08:14 pywikibot/data/api/_paraminfo.py:181: in _fetch
17:08:14 result = request.submit()
17:08:14 pywikibot/data/api/_requests.py:1310: in submit
17:08:14 self._data = super().submit()
17:08:14 pywikibot/data/api/_requests.py:1012: in submit
17:08:14 response, use_get = self._http_request(use_get, uri, body,
headers,
17:08:14 pywikibot/data/api/_requests.py:682: in _http_request
17:08:14 response = http.request(self.site, uri=uri,
17:08:14 pywikibot/comms/http.py:280: in request
17:08:14 r = fetch(baseuri, headers=headers, **kwargs)
17:08:14 pywikibot/comms/http.py:452: in fetch
17:08:14 callback(response)
17:08:14 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _
17:08:14
17:08:14 response =
ConnectionError(MaxRetryError('HTTPSConnectionPool(host=\'test.wikipedia.org\',
port=443): Max retries exceeded with u...on object at 0x0000561af062f1d8>:
Failed to resolve \'test.wikipedia.org\' ([Errno -2] Name or service not
known)"))'))
17:08:14
17:08:14 def error_handling_callback(response):
17:08:14 """Raise exceptions and log alerts.
17:08:14
17:08:14 :param response: Response returned by Session.request().
17:08:14 :type response: :py:obj:`requests.Response`
17:08:14 """
17:08:14 # TODO: do some error correcting stuff
17:08:14 if isinstance(response, requests.exceptions.SSLError) \
17:08:14 and 'certificate verify failed' in str(response):
17:08:14 raise FatalServerError(str(response))
17:08:14
17:08:14 if isinstance(response, requests.ConnectionError):
17:08:14 msg = str(response)
17:08:14 if ('NewConnectionError' in msg or
'NameResolutionError' in msg) \
17:08:14 and re.search(r'\[Errno (-2|8|11001)\]', msg):
17:08:14 > raise ConnectionError(response)
17:08:14 E ConnectionError:
HTTPSConnectionPool(host='test.wikipedia.org', port=443): Max retries exceeded
with url: /w/api.php?action=paraminfo&modules=edit&maxlag=5&format=json (Caused
by NameResolutionError("<urllib3.connection.HTTPSConnection object at
0x0000561af062f1d8>: Failed to resolve 'test.wikipedia.org' ([Errno -2] Name or
service not known)"))
17:08:14
17:08:14 pywikibot/comms/http.py:323: ConnectionError
TASK DETAIL
https://phabricator.wikimedia.org/T381202
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Aklapper, pywikibot-bugs-list, Xqt, mevo, PotsdamLamb, Jyoo1011,
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Aram, Viztor, Wenyi, Tbscho,
MayS, Mdupont, JJMC89, Dvorapa, Altostratus, binbot, Avicennasis, mys_721tx,
jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]