John Vandenberg has uploaded a new change for review.

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

Change subject: Fix test_preload_langlinks_count
......................................................................

Fix test_preload_langlinks_count

Test currently uses len() on the generator instead of the page list,
causing TypeError: object of type 'PageGenerator' has no len().

Change-Id: I5c1a389926b35e2c86cdf9615338622929cb9077
---
M tests/site_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/45/179945/1

diff --git a/tests/site_tests.py b/tests/site_tests.py
index 70e9916..bd156eb 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -1835,7 +1835,7 @@
                 self.assertFalse(hasattr(page, '_pageprops'))
             count += 1
 
-        self.assertEqual(len(links), count)
+        self.assertEqual(len(pages), count)
 
     def _test_preload_langlinks_long(self):
         """Test preloading continuation works."""

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c1a389926b35e2c86cdf9615338622929cb9077
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to