Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion requirements-testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pytest-cov
pytest-forked
pytest-localserver
pytest-timeout
jsonschema
executing
asttokens
responses
Expand Down
2 changes: 2 additions & 0 deletions scripts/populate_tox/tox.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ deps =
# === Common ===
py3.8-common: hypothesis
common: brotli
common: jsonschema
common: pysocks
common: pytest-asyncio
common: httpcore[asyncio]
Expand All @@ -101,6 +102,7 @@ deps =
{py3.6,py3.7}-gevent: pytest<7.0.0
{py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest
gevent: brotli
gevent: jsonschema
gevent: pysocks
gevent: pytest-asyncio
gevent: setuptools<82
Expand Down
7 changes: 6 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
except ImportError:
brotli = None

import jsonschema
try:
import jsonschema
except ImportError:
jsonschema = None

import pytest
from pytest_localserver.http import WSGIServer
from werkzeug.wrappers import Request, Response
Expand Down Expand Up @@ -236,6 +240,7 @@ def _capture_internal_warnings():
@pytest.fixture
def validate_event_schema(tmpdir):
def inner(event):
assert jsonschema is not None
if SENTRY_EVENT_SCHEMA:
jsonschema.validate(instance=event, schema=SENTRY_EVENT_SCHEMA)

Expand Down
2 changes: 2 additions & 0 deletions tox.ini

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading