Page MenuHomePhabricator

test_https_cert_error method of http_tests.HttpsCertificateTestCase fails with threadfree Python
Open, MediumPublic

Description

======================================================================
FAIL: test_https_cert_error (tests.http_tests.HttpsCertificateTestCase.test_https_cert_error)
Test if http.fetch respects disabled ssl certificate validation.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/pywikibot/pywikibot/tests/http_tests.py", line 118, in test_https_cert_error
    self.assertIn('InsecureRequestWarning',
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
                  [w.category.__name__ for w in warning_log])
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'InsecureRequestWarning' not found in []

Probablly urllib3 or requests does not support it yet.

Event Timeline

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

[pywikibot/core@master] tests: decorate HttpsCertificateTestCase as expectedFailure if THREADING_FREE

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

Change #1217834 merged by jenkins-bot:

[pywikibot/core@master] tests: decorate HttpsCertificateTestCase as expectedFailure if THREADING_FREE

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

Xqt triaged this task as Medium priority.Dec 14 2025, 12:02 PM