XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/237984
Change subject: [FEAT] Test pywikibot.setAction ...................................................................... [FEAT] Test pywikibot.setAction Change-Id: I867a6d97c73c76548dce43783a1acec2c9690163 --- M tests/dry_site_tests.py 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/84/237984/1 diff --git a/tests/dry_site_tests.py b/tests/dry_site_tests.py index e287962..5b103db 100644 --- a/tests/dry_site_tests.py +++ b/tests/dry_site_tests.py @@ -101,6 +101,30 @@ user_agent(x, format_string='Foo ({script_comments})')) +class TestSetAction(DeprecationTestCase): + + """Test the deprecated setAction function.""" + + net = False + + def setUp(self): + """Backup the original configuration.""" + super(TestSetAction, self).setUp() + self._old_config = pywikibot.config.default_edit_summary + + def tearDown(self): + """Restore the original configuration.""" + pywikibot.config.default_edit_summary = self._old_config + super(TestSetAction, self).tearDown() + + def test_set_action(self): + """Test deprecated setAction function.""" + pywikibot.setAction('{0}X{0}'.format(self._old_config)) + self.assertOneDeprecation(self.INSTEAD) + self.assertEqual(pywikibot.config.default_edit_summary, + '{0}X{0}'.format(self._old_config)) + + class TestMustBe(DebugOnlyTestCase): """Test cases for the must_be decorator.""" -- To view, visit https://gerrit.wikimedia.org/r/237984 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I867a6d97c73c76548dce43783a1acec2c9690163 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise <commodorefabia...@gmx.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits