jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1041631?usp=email )
Change subject: [tests] skip test_titleblacklist when running test as sysop ......................................................................
[tests] skip test_titleblacklist when running test as sysop
Bug: T367166 Change-Id: Iafcc1646f3c5080c5919f4814d9658508307f82f --- M tests/edit_failure_tests.py 1 file changed, 4 insertions(+), 0 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/edit_failure_tests.py b/tests/edit_failure_tests.py index ce984cb..a9eab69 100755 --- a/tests/edit_failure_tests.py +++ b/tests/edit_failure_tests.py @@ -59,6 +59,10 @@
def test_titleblacklist(self): """Test that title blacklist raise the appropriate exception.""" + user = pywikibot.User(self.site, self.site.user()) + if 'sysop' in user.groups(): + self.skipTest(f'{user} is member of the sysop group') + page = pywikibot.Page(self.site, 'User:UpsandDowns1234/Blacklisttest') with self.assertRaises(TitleblacklistError): page.save()