jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/640815 )

Change subject: [bugfix] use assertRaisesRegex instead of assertRaisesRegexp
......................................................................

[bugfix] use assertRaisesRegex instead of assertRaisesRegexp

assertRaisesRegexp was renamed to assertRaisesRegex with Python 3.2.
Use contextmanager which was introduced with Python 3 instead of
parital parameters

Bug: T267797
Change-Id: I780b36fe576ea61733a2a9a76b9a096697222f9f
---
M tests/site_tests.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/site_tests.py b/tests/site_tests.py
index 0806f34..74f8d7d 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -3604,8 +3604,8 @@
         self.assertIsNone(site.login())
 
         if site.is_oauth_token_available():
-            self.assertRaisesRegexp(api.APIError, 'cannotlogout.*OAuth',
-                                    site.logout)
+            with self.assertRaisesRegex(api.APIError, 'cannotlogout.*OAuth'):
+                site.logout()
             self.assertTrue(site.logged_in())
             self.assertIn(site._loginstatus, (loginstatus.IN_PROGRESS,
                                               loginstatus.AS_USER))

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/640815
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I780b36fe576ea61733a2a9a76b9a096697222f9f
Gerrit-Change-Number: 640815
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Mpaa <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to