Page MenuHomePhabricator

test_url_image of proofreadpage_tests.TestProofreadPageValidSite fails
Closed, ResolvedPublicBUG REPORT

Description

09:21:03 ======================================================================
09:21:03 FAIL: test_url_image (tests.proofreadpage_tests.TestProofreadPageValidSite)
09:21:03 Test fetching of url image of the scan of ProofreadPage.
09:21:03 ----------------------------------------------------------------------
09:21:03 Traceback (most recent call last):
09:21:03   File "/src/tests/proofreadpage_tests.py", line 415, in test_url_image
09:21:03     self.assertEqual(page.url_image, self.valid_redlink['url_image'])
09:21:03 AssertionError: 'http[34 chars]e/en/thumb/3/37/Pywikibot_test_page_3.jpg/60px[22 chars].jpg' != 'http[34 chars]e/en/3/37/Pywikibot_test_page_3.jpg'
09:21:03 - https://upload.wikimedia.org/wikisource/en/thumb/3/37/Pywikibot_test_page_3.jpg/60px-Pywikibot_test_page_3.jpg
09:21:03 ?                                            ------                              -------------------------------
09:21:03 + https://upload.wikimedia.org/wikisource/en/3/37/Pywikibot_test_page_3.jpg

Event Timeline

Xqt triaged this task as High priority.Mar 13 2026, 8:32 AM
Xqt changed the subtype of this task from "Task" to "Bug Report".
Xqt moved this task from Backlog to CI test failures on the Pywikibot-tests board.

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

[pywikibot/core@master] Tests: Fix TestProofreadPageValidSite.test_url_image

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

Change #1251360 merged by Xqt:

[pywikibot/core@master] Tests: Fix TestProofreadPageValidSite.test_url_image

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

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

[pywikibot/core@master] Revert "Tests: Fix TestProofreadPageValidSite.test_url_image"

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

Seems that the url of page.url_image of a valid red link is not deterministic

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

[pywikibot/core@master] Tests: Fix TestProofreadPageValidSite.test_url_image

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

Change #1257301 merged by Xqt:

[pywikibot/core@master] Tests: Fix TestProofreadPageValidSite.test_url_image

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

Change #1254143 abandoned by Xqt:

[pywikibot/core@master] Revert "Tests: Fix TestProofreadPageValidSite.test_url_image"

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

Fails again:

14:56:51 ======================================================================
14:56:51 FAIL: test_url_image (tests.proofreadpage_tests.TestProofreadPageValidSite)
14:56:51 Test fetching of url image of the scan of ProofreadPage.
14:56:51 ----------------------------------------------------------------------
14:56:51 Traceback (most recent call last):
14:56:51   File "/src/tests/proofreadpage_tests.py", line 411, in test_url_image
14:56:51     self.assertEqual(page.url_image, self.valid['url_image'])
14:56:51 AssertionError: 'http[85 chars]1.djvu/page12-1920px-Popular_Science_Monthly_Volume_1.djvu.jpg' != 'http[85 chars]1.djvu/page12-2012px-Popular_Science_Monthly_Volume_1.djvu.jpg'
14:56:51 - https://upload.wikimedia.org/wikipedia/commons/thumb/a/ac/Popular_Science_Monthly_Volume_1.djvu/page12-1920px-Popular_Science_Monthly_Volume_1.djvu.jpg
14:56:51 ?                                                                                                        --
14:56:51 + https://upload.wikimedia.org/wikipedia/commons/thumb/a/ac/Popular_Science_Monthly_Volume_1.djvu/page12-2012px-Popular_Science_Monthly_Volume_1.djvu.jpg
14:56:51 ?                                                                                                          ++
14:56:51 
14:56:51 
14:56:51 ----------------------------------------------------------------------

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

[pywikibot/core@master] Tests: Fix TestProofreadPageValidSite.test_url_image

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

Change #1264633 merged by Xqt:

[pywikibot/core@master] Tests: Fix TestProofreadPageValidSite.test_url_image

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

Still an issue:

12:24:45 FAIL: test_url_image (tests.proofreadpage_tests.TestProofreadPageValidSite)
12:24:45 Test fetching of url image of the scan of ProofreadPage.
12:24:45 ----------------------------------------------------------------------
12:24:45 Traceback (most recent call last):
12:24:45   File "/src/tests/proofreadpage_tests.py", line 416, in test_url_image
12:24:45     self.assertIn(page.url_image, self.valid['url_image'])
12:24:45 AssertionError: 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/ac/Popular_Science_Monthly_Volume_1.djvu/page12-1920px-Popular_Science_Monthly_Volume_1.djvu.jpg?utm_source=en.wikisource.org&utm_campaign=api&utm_content=thumbnail' not found in ('https://upload.wikimedia.org/wikipedia/commons/thumb/a/ac/Popular_Science_Monthly_Volume_1.djvu/page12-2012px-Popular_Science_Monthly_Volume_1.djvu.jpg', 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/ac/Popular_Science_Monthly_Volume_1.djvu/page12-1920px-Popular_Science_Monthly_Volume_1.djvu.jpg')
12:24:45

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

[pywikibot/core@master] fix: remove UTM tracking parameters from ProofreadPage.url_image

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

Change #1272691 merged by Xqt:

[pywikibot/core@master] fix: remove UTM tracking parameters from ProofreadPage.url_image

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