jenkins-bot has submitted this change and it was merged.

Change subject: Identify which page is no redirect
......................................................................


Identify which page is no redirect

One hypothesis why the site tests tells that images are redirects
although it only queried non-redirects is that between iterating through
it and checking it changes to a redirect page. This prints the checked
page if it is a redirect in an attempt to verify that hypothesis.

Bug: 73120
Change-Id: I970099e8aaa9d558909ae9e1a8091aaf6f092829
---
M tests/site_tests.py
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/site_tests.py b/tests/site_tests.py
index df22137..30c2644 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -696,6 +696,9 @@
         imagepage = self.imagepage
         for using in mysite.imageusage(imagepage, filterredir=False, total=5):
             self.assertIsInstance(using, pywikibot.Page)
+            if using.isRedirectPage():
+                print('{0} is a redirect, although just non-redirects were '
+                      'searched. See also bug 73120'.format(using))
             self.assertFalse(using.isRedirectPage())
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/171814
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I970099e8aaa9d558909ae9e1a8091aaf6f092829
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <commodorefabia...@gmx.de>
Gerrit-Reviewer: John Vandenberg <jay...@gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to