Skip to content

Commit 8f834b0

Browse files
Broaden exception handling in test_matches_schema_store tests
1 parent bd036f6 commit 8f834b0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/usethis/_integrations/ci/bitbucket/test_bitbucket_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_matches_schema_store(self):
3131
online_schema_json = requests.get(
3232
"https://api.bitbucket.org/schemas/pipelines-configuration", timeout=5
3333
).text
34-
except requests.exceptions.ConnectionError as err:
34+
except requests.exceptions.RequestException as err:
3535
if os.getenv("CI"):
3636
pytest.skip(
3737
"Failed to fetch JSON schema (connection issues); skipping test"

tests/usethis/_integrations/pre_commit/test_pre_commit_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_matches_schema_store(self):
3333
online_schema_json = requests.get(
3434
"https://json.schemastore.org/pre-commit-config.json", timeout=5
3535
).text
36-
except requests.exceptions.ConnectionError as err:
36+
except requests.exceptions.RequestException as err:
3737
if os.getenv("CI"):
3838
pytest.skip(
3939
"Failed to fetch JSON schema (connection issues); skipping test"

0 commit comments

Comments
 (0)