jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/385766 )
Change subject: [test] suppress deprecation warning in archivebot_tests.py ...................................................................... [test] suppress deprecation warning in archivebot_tests.py Change-Id: Ibc8dc3b65b6799dacd781cee664118ea6db4a523 --- M tests/archivebot_tests.py 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified Zoranzoki21: Looks good to me, but someone else must approve diff --git a/tests/archivebot_tests.py b/tests/archivebot_tests.py index 3b4971c..ac253ce 100644 --- a/tests/archivebot_tests.py +++ b/tests/archivebot_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests for archivebot scripts.""" # -# (C) Pywikibot team, 2016 +# (C) Pywikibot team, 2016-2017 # # Distributed under the terms of the MIT license. # @@ -13,7 +13,7 @@ import pywikibot.page from pywikibot.textlib import TimeStripper -from pywikibot.tools import StringTypes as basestring +from pywikibot.tools import suppress_warnings, StringTypes as basestring from scripts import archivebot @@ -98,7 +98,8 @@ def test_checkstr(self): """Test for extracting key and duration from shorthand notation of durations.""" self.assertEqual(archivebot.checkstr('400s'), ('s', '400')) - self.assertEqual(archivebot.checkstr('3000'), ('s', '3000')) + with suppress_warnings(): + self.assertEqual(archivebot.checkstr('3000'), ('s', '3000')) self.assertEqual(archivebot.checkstr('7d'), ('d', '7')) self.assertEqual(archivebot.checkstr('3y'), ('y', '3')) # Should pass, because the key is verified in str2time -- To view, visit https://gerrit.wikimedia.org/r/385766 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc8dc3b65b6799dacd781cee664118ea6db4a523 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt <i...@gno.de> Gerrit-Reviewer: Dalba <dalba.w...@gmail.com> Gerrit-Reviewer: John Vandenberg <jay...@gmail.com> Gerrit-Reviewer: Magul <tomasz.magul...@gmail.com> Gerrit-Reviewer: Zoranzoki21 <zorandori4...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ Pywikibot-commits mailing list Pywikibot-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits