jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/431084 )
Change subject: [test] skip test when MementoClientException occurs ......................................................................
[test] skip test when MementoClientException occurs
Bug: T193924 Change-Id: I5b02d3106d4fabb1b555f20bfaeeb0e94253e9b6 --- M tests/weblinkchecker_tests.py 1 file changed, 3 insertions(+), 1 deletion(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/weblinkchecker_tests.py b/tests/weblinkchecker_tests.py index c62b235..2502532 100644 --- a/tests/weblinkchecker_tests.py +++ b/tests/weblinkchecker_tests.py @@ -28,6 +28,8 @@ """Test memento client."""
def _get_archive_url(self, url, date_string=None): + from memento_client import MementoClientException # noqa: E402 + if date_string is None: when = datetime.datetime.now() else: @@ -35,7 +37,7 @@ try: return weblinkchecker._get_closest_memento_url( url, when, self.timegate_uri) - except RequestsConnectionError as e: + except (RequestsConnectionError, MementoClientException) as e: self.skipTest(e)
pywikibot-commits@lists.wikimedia.org