Skip to content

Commit

Permalink
stub verification
Browse files Browse the repository at this point in the history
  • Loading branch information
emmettbutler committed Jan 24, 2025
1 parent 60ca763 commit 4ffec90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/contrib/dd_trace_api/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def test_start_span(self):
with dd_trace_api.tracer.Tracer().start_span("web.request") as span:
assert not isinstance(span, dd_span_class), "Returned span object should be a stub"
assert not hasattr(span, "span_id"), "Returned span stub should not support read operations"
span.finish()
spans = self.pop_spans()
assert len(spans) == 1
generated_span = spans[0]
assert isinstance(generated_span, dd_span_class), "Generated span is a real span"
assert hasattr(generated_span, "span_id"), "Generated span should support read operations"

0 comments on commit 4ffec90

Please sign in to comment.