jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[tests] Skip SiteRandomTestCase on beta cluster

Also fix mythrottle._lagvalue check in TestLagpattern
which may be an int (at beta)

Bug: T282602
Change-Id: I59e41e1e4a6f8a1d86dcd482de9b674ebe9981a6
---
M tests/api_tests.py
M tests/site_tests.py
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/api_tests.py b/tests/api_tests.py
index ae6b813..af3b672 100644
--- a/tests/api_tests.py
+++ b/tests/api_tests.py
@@ -988,8 +988,8 @@
pywikibot.warning(
'Wrong api.lagpattern regex, cannot retrieve lag value')
raise e
- self.assertIsInstance(mythrottle._lagvalue, float)
- self.assertGreaterEqual(mythrottle._lagvalue, 0.0)
+ self.assertIsInstance(mythrottle._lagvalue, (int, float))
+ self.assertGreaterEqual(mythrottle._lagvalue, 0)
self.assertIsInstance(mythrottle.retry_after, int)
self.assertGreaterEqual(mythrottle.retry_after, 0)

diff --git a/tests/site_tests.py b/tests/site_tests.py
index 9813d81..3b126fa 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -2360,6 +2360,8 @@
performed, so we also don't test this here.
"""
mysite = self.get_site()
+ if mysite.family.name in ('wpbeta', 'wsbeta'):
+ self.skipTest('Skipping test on {} due to T282602'.format(mysite))
pages = []
rngen = mysite.randompages(total=None)
rngen.set_query_increment = 5
@@ -2373,6 +2375,8 @@
def test_limit_10(self):
"""Test site.randompages() with limit."""
mysite = self.get_site()
+ if mysite.family.name in ('wpbeta', 'wsbeta'):
+ self.skipTest('Skipping test on {} due to T282602'.format(mysite))
rn = list(mysite.randompages(total=10))
self.assertLessEqual(len(rn), 10)
for a_page in rn:

To view, visit change 768216. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I59e41e1e4a6f8a1d86dcd482de9b674ebe9981a6
Gerrit-Change-Number: 768216
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged