jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/595275 )
Change subject: [cleanup] Remove T249090 debugging stuff ......................................................................
[cleanup] Remove T249090 debugging stuff
Solving T249090 issue was declined because Python 2.7 is to be dropped soon and the related tests are done with Python 3.5 now. Therefore we can remove this debugging code.
Bug: T249090 Change-Id: Ifc5c5a152a5ee12ee55b0cd86a4fa4882b506776 --- M tests/api_tests.py 1 file changed, 2 insertions(+), 16 deletions(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/api_tests.py b/tests/api_tests.py index f8f5da9..1f7bd33 100644 --- a/tests/api_tests.py +++ b/tests/api_tests.py @@ -17,7 +17,6 @@ import pywikibot.page import pywikibot.site
-from pywikibot import config from pywikibot.throttle import Throttle from pywikibot.tools import ( suppress_warnings, @@ -25,13 +24,13 @@ UnicodeType, )
-from tests import patch, unittest_print from tests.aspects import ( unittest, TestCase, DefaultSiteTestCase, DefaultDrySiteTestCase, ) +from tests import patch from tests.utils import FakeLoginManager, PatchedHttp
if not PY2: @@ -137,25 +136,12 @@
"""API Request object test class."""
- # @suppress_warnings(r'Request() invoked without a site', RuntimeWarning) + @suppress_warnings(r'Request() invoked without a site', RuntimeWarning) def testObjectCreation(self): """Test api.Request() constructor with implicit site creation.""" - unittest_print('\n\n>>> Debugging stuff (T249090) ----') - unittest_print('config at method start:', config.mylang, config.family) - unittest_print('<<< ------------------------------\n') - req = api.Request(parameters={'action': 'test', 'foo': '', 'bar': 'test'}) self.assertTrue(req) - - unittest_print('>>> Debugging stuff (T249090) ----') - unittest_print('config:', config.mylang, config.family) - unittest_print('Request:', req) - unittest_print(req.__dict__) - unittest_print('config before asserting:', - config.mylang, config.family) - unittest_print('<<< ------------------------------') - self.assertEqual(req.site, self.get_site())
pywikibot-commits@lists.wikimedia.org