jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Tests: Allow no protected page ......................................................................
[FIX] Tests: Allow no protected page
Because test.wikidata has only two protected pages at that point and both aren't in the main namespace the tests error.
Change-Id: I713a1f722a4c0678e4f407ba09973dba473fe8f7 --- 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 f6933ba..db78da7 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -715,6 +715,9 @@ for level in all_levels: if list(site.protectedpages(type='edit', level=level, total=1)): levels.add(level) + if not levels: + raise unittest.SkipTest('The site "{0}" has no protected pages in ' + 'main namespace.'.format(site)) # select one level which won't yield all pages from above level = next(iter(levels)) if len(levels) == 1: