Xqt added a comment.
Expanding this tests with subTest shows that the protocol is always given:
C:\pwb\GIT\core>pwb page_tests -v TestShortLink
tests: max_retries reduced from 15 to 1
test_create_short_link (__main__.TestShortLink)
Test create_short_link function. ...
======================================================================
FAIL: test_create_short_link (__main__.TestShortLink)
(parameters='defaulted')
Test create_short_link function.
----------------------------------------------------------------------
Traceback (most recent call last):
File ".\tests\page_tests.py", line 1189, in test_create_short_link
self.assertEqual(p1.create_short_link(), 'w.wiki/3Cy')
AssertionError: 'https://w.wiki/3Cy' != 'w.wiki/3Cy'
- https://w.wiki/3Cy
+ w.wiki/3Cy
======================================================================
FAIL: test_create_short_link (__main__.TestShortLink) (with_protocol=True)
Test create_short_link function.
----------------------------------------------------------------------
Traceback (most recent call last):
File ".\tests\page_tests.py", line 1192, in test_create_short_link
'https://w.wiki/3Cy')
AssertionError: 'https://https://w.wiki/3Cy' != 'https://w.wiki/3Cy'
- https://https://w.wiki/3Cy
? --------
+ https://w.wiki/3Cy
======================================================================
FAIL: test_create_short_link (__main__.TestShortLink) (permalink=True)
Test create_short_link function.
----------------------------------------------------------------------
Traceback (most recent call last):
File ".\tests\page_tests.py", line 1194, in test_create_short_link
self.assertEqual(p1.create_short_link(permalink=True), 'w.wiki/3Cz')
AssertionError: 'https://w.wiki/3Cz' != 'w.wiki/3Cz'
- https://w.wiki/3Cz
+ w.wiki/3Cz
----------------------------------------------------------------------
Ran 1 test in 3.923s
FAILED (failures=3)
C:\pwb\GIT\core>
TASK DETAIL
https://phabricator.wikimedia.org/T223865
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Aklapper, pywikibot-bugs-list, Framawiki, Xqt, Viztor, DannyS712, Wenyi,
Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Avicennasis, mys_721tx, jayvdb, Dalba,
Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs