jenkins-bot has submitted this change and it was merged.
Change subject: Skip patrol() test when no recent changes exist ......................................................................
Skip patrol() test when no recent changes exist
Bug: T110404 Change-Id: I2de795e8347777579c575670663b21db39d8bfda --- M tests/site_tests.py 1 file changed, 5 insertions(+), 1 deletion(-)
Approvals: XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/site_tests.py b/tests/site_tests.py index ed12f11..274c9b7 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -1610,7 +1610,11 @@ """Test the site.patrol() method.""" mysite = self.get_site()
- rc = list(mysite.recentchanges(total=1))[0] + rc = list(mysite.recentchanges(total=1)) + if not rc: + raise unittest.SkipTest('no recent changes to patrol') + + rc = rc[0]
# site.patrol() needs params self.assertRaises(pywikibot.Error, lambda x: list(x), mysite.patrol())
pywikibot-commits@lists.wikimedia.org