def test_span_without_operation_name(self, *, cthread): span = opentracing.Span( tracer=Mock('tobj'), context=opentracing.SpanContext(), ) assert cthread._on_span_cancelled_early(span) is None
def start_span(operation_name=None, **kwargs): span = opentracing.Span( tracer=tobj, context=opentracing.SpanContext(), ) span.operation_name = operation_name assert span.operation_name == operation_name return span