jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/435716 )
Change subject: [test] User assertRaisesRegex again ......................................................................
[test] User assertRaisesRegex again
After support for Python 2.6 has been dropped assertRaisesRegex can be used again in TestBotTreatExit._exit()
This reverts commit Id17e6e4a
Bug: T158519 Change-Id: I2003b1eeab2522a70cd35a89138c42cc3feeb53f --- M tests/bot_tests.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Framawiki: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/bot_tests.py b/tests/bot_tests.py index da9c7b3..5ca63f1 100644 --- a/tests/bot_tests.py +++ b/tests/bot_tests.py @@ -169,8 +169,8 @@ self.assertIs(exc, exception) else: self.assertIsNone(exc) - # Cannot use assertRaisesRegex. Python 2.6 issue. See T158519. - self.assertRaises(StopIteration, next, self._page_iter) + self.assertRaisesRegex(StopIteration, '^$', next, + self._page_iter) return exit
pywikibot-commits@lists.wikimedia.org