jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/327514 )
Change subject: Raise AssertionError on any failure in assertSite
......................................................................
Raise AssertionError on any failure in assertSite
Bug: T151368
Change-Id: I673f284de5da2a83f9b8c72475d24b5625a3b274
---
M tests/site_detect_tests.py
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Lokal Profil: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/site_detect_tests.py b/tests/site_detect_tests.py
index f8bf337..c808b0a 100644
--- a/tests/site_detect_tests.py
+++ b/tests/site_detect_tests.py
@@ -61,7 +61,11 @@
@type url: str
@raises AssertionError: Site under url is not MediaWiki powered
"""
- self.assertIsInstance(MWSite(url), MWSite)
+ try:
+ self.assertIsInstance(MWSite(url), MWSite)
+ except (AttributeError, ConnectionError, RuntimeError, ServerError,
+ Timeout):
+ raise AssertionError
def assertNoSite(self, url):
"""
--
To view, visit
https://gerrit.wikimedia.org/r/327514
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I673f284de5da2a83f9b8c72475d24b5625a3b274
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Lokal Profil <lokal.profil(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>