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): """