jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/342830 )
Change subject: bot_tests.py: Use assertRaises for StopIteration('') ......................................................................
bot_tests.py: Use assertRaises for StopIteration('')
Bug: T158519 Change-Id: Id17e6e4a72d008814419199cc858bf3b1242c499 --- M tests/bot_tests.py 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/tests/bot_tests.py b/tests/bot_tests.py index ad7d3bb..f99eee1 100644 --- a/tests/bot_tests.py +++ b/tests/bot_tests.py @@ -171,7 +171,8 @@ self.assertIs(exc, exception) else: self.assertIsNone(exc) - self.assertRaisesRegex(StopIteration, '^$', next, self._page_iter) + # Cannot use assertRaisesRegex. Python 2.6 issue. See T158519. + self.assertRaises(StopIteration, next, self._page_iter) return exit
pywikibot-commits@lists.wikimedia.org