Skip to content

Commit 0d5dbeb

Browse files
committed
remove old set_* tests
1 parent 88cfd8b commit 0d5dbeb

File tree

1 file changed

+0
-66
lines changed

1 file changed

+0
-66
lines changed

tests/tracing/test_span_streaming.py

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -782,72 +782,6 @@ def test_set_span_status_on_error(sentry_init, capture_envelopes):
782782
assert span["status"] == "error"
783783

784784

785-
def test_set_span_op(sentry_init, capture_envelopes):
786-
sentry_init(
787-
traces_sample_rate=1.0,
788-
_experiments={"trace_lifecycle": "stream"},
789-
)
790-
791-
events = capture_envelopes()
792-
793-
with sentry_sdk.traces.start_span(name="span") as span:
794-
span.set_op("function")
795-
assert span.get_attributes()["sentry.op"] == "function"
796-
797-
sentry_sdk.get_client().flush()
798-
spans = envelopes_to_spans(events)
799-
800-
assert len(spans) == 1
801-
(span,) = spans
802-
803-
assert span["name"] == "span"
804-
assert span["attributes"]["sentry.op"] == "function"
805-
806-
807-
def test_set_span_source(sentry_init, capture_envelopes):
808-
sentry_init(
809-
traces_sample_rate=1.0,
810-
_experiments={"trace_lifecycle": "stream"},
811-
)
812-
813-
events = capture_envelopes()
814-
815-
with sentry_sdk.traces.start_span(name="span") as span:
816-
span.set_attribute("sentry.span.source", SegmentSource.TASK.value)
817-
assert span.get_attributes()["sentry.span.source"] == SegmentSource.TASK.value
818-
819-
sentry_sdk.get_client().flush()
820-
spans = envelopes_to_spans(events)
821-
822-
assert len(spans) == 1
823-
(span,) = spans
824-
825-
assert span["name"] == "span"
826-
assert span["attributes"]["sentry.span.source"] == SegmentSource.TASK.value
827-
828-
829-
def test_set_span_origin(sentry_init, capture_envelopes):
830-
sentry_init(
831-
traces_sample_rate=1.0,
832-
_experiments={"trace_lifecycle": "stream"},
833-
)
834-
835-
events = capture_envelopes()
836-
837-
with sentry_sdk.traces.start_span(name="span") as span:
838-
span.set_origin("redis")
839-
assert span.get_attributes()["sentry.origin"] == "redis"
840-
841-
sentry_sdk.get_client().flush()
842-
spans = envelopes_to_spans(events)
843-
844-
assert len(spans) == 1
845-
(span,) = spans
846-
847-
assert span["name"] == "span"
848-
assert span["attributes"]["sentry.origin"] == "redis"
849-
850-
851785
@pytest.mark.parametrize(
852786
("ignore_spans", "name", "attributes", "ignored"),
853787
[

0 commit comments

Comments
 (0)