def test_current_root_span(self): # it should return the current active root span ctx = Context() span = Span(tracer=None, name='fake_span') ctx.add_span(span) assert span == ctx.get_current_root_span()
def test_current_root_span_none(self): # it should return none when there is no root span ctx = Context() assert ctx.get_current_root_span() is None