jenkins-bot has submitted this change and it was merged.
Change subject: site_tests.py: fix tests for site.patrol() ......................................................................
site_tests.py: fix tests for site.patrol()
Fix Travis error for test.wikidata and fr.wiktionary: APIError: permissiondenied: Permission denied
Change-Id: I70d5cef3ae2601b2316d9364418906fae7091459 --- M tests/site_tests.py 1 file changed, 6 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 fca7262..127e71f 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -1041,7 +1041,12 @@
# site.patrol() needs params self.assertRaises(pywikibot.Error, lambda x: list(x), mysite.patrol()) - result = list(mysite.patrol(rcid=rc['rcid'])) + try: + result = list(mysite.patrol(rcid=rc['rcid'])) + except api.APIError as error: + if error.code == u'permissiondenied': + raise unittest.SkipTest(error) + raise
if hasattr(mysite, u'_patroldisabled') and mysite._patroldisabled: raise unittest.SkipTest(u'Patrolling is disabled on %s wiki.'
pywikibot-commits@lists.wikimedia.org