jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/578349 )
Change subject: [tests] skip SearchTestCase.test_search if code is 'gsrsearch-text-disabled' ......................................................................
[tests] skip SearchTestCase.test_search if code is 'gsrsearch-text-disabled'
Bug: T247249 Change-Id: Ia7179ec20cf413e891a6c6c5ec04a2b4dafd9f79 --- M tests/site_tests.py 1 file changed, 5 insertions(+), 3 deletions(-)
Approvals: D3r1ck01: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/site_tests.py b/tests/site_tests.py index 0dd079f..f1b9e2f 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -1691,9 +1691,11 @@ self.assertEqual(hit.namespace(), 0) except pywikibot.data.api.APIError as e: if e.code == 'gsrsearch-error' and 'timed out' in e.info: - self.skipTest('gsrsearch returned timeout on site: {!r}' - .format(e)) - raise + self.skipTest('gsrsearch returned timeout on site{}:\n{!r}' + .format(mysite, e)) + if e.code == 'gsrsearch-text-disabled': + self.skipTest('gsrsearch is diabled on site {}:\n{!r}' + .format(mysite, e))
@suppress_warnings("where='title' is deprecated", DeprecationWarning) def test_search_where_title(self):
pywikibot-commits@lists.wikimedia.org