Skip to content

Commit 41bf12e

Browse files
jimf5p-pautov
andauthored
Add more checkes to get_span.
Co-authored-by: p-pautov <[email protected]>
1 parent a78bd25 commit 41bf12e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/trace_service.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ def get_batch(self):
2323
return self.batches.pop()
2424

2525
def get_span(self):
26-
return self.get_batch()[0].scope_spans[0].spans.pop()
26+
batch = self.get_batch()
27+
assert len(batch.scope_spans) == 1
28+
assert len(batch.scope_spans[0].spans) == 1
29+
return batch.scope_spans[0].spans.pop()
2730

2831

2932
@pytest.fixture(scope="module")

0 commit comments

Comments
 (0)