jenkins-bot merged this change.
[bugfix] enable redirect_bot_tests unittest
Bug: T203877
Change-Id: I642768586973d4d171080842e5bae39c9e981fef
---
M tests/redirect_bot_tests.py
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tests/redirect_bot_tests.py b/tests/redirect_bot_tests.py
index 3f5afc6..9fcc176 100644
--- a/tests/redirect_bot_tests.py
+++ b/tests/redirect_bot_tests.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""Tests for the redirect.py script."""
#
-# (C) Pywikibot team, 2017
+# (C) Pywikibot team, 2017-2018
#
# Distributed under the terms of the MIT license.
#
@@ -12,7 +12,7 @@
from scripts.redirect import RedirectRobot
-from tests import Mock, patch
+from tests import Mock, patch, unittest
from tests.aspects import DefaultSiteTestCase
@@ -52,3 +52,10 @@
bot = RedirectRobot('broken', **options)
w.assert_called_with('No speedy deletion template "n" available.')
self.assertEqual(bot.sdtemplate, None)
+
+
+if __name__ == '__main__': # pragma: no cover
+ try:
+ unittest.main()
+ except SystemExit:
+ pass
To view, visit change 459241. To unsubscribe, or for help writing mail filters, visit settings.