Exemplo n.º 1
0
    def test_add_annotation_abstract(self):
        span = BaseSpan()

        with self.assertRaises(NotImplementedError):
            span.add_annotation("desc")
Exemplo n.º 2
0
    def test_add_time_event_abstract(self):
        span = BaseSpan()

        with self.assertRaises(NotImplementedError):
            span.add_time_event(None)
Exemplo n.º 3
0
    def test_finish_abstract(self):
        span = BaseSpan()

        with self.assertRaises(NotImplementedError):
            span.finish()
Exemplo n.º 4
0
    def test_add_attribute_abstract(self):
        span = BaseSpan()

        with self.assertRaises(NotImplementedError):
            span.add_attribute("key", "value")
Exemplo n.º 5
0
    def test_start_abstract(self):
        span = BaseSpan()

        with self.assertRaises(NotImplementedError):
            span.start()
Exemplo n.º 6
0
    def test_children_abstract(self):
        span = BaseSpan()

        with self.assertRaises(NotImplementedError):
            span.children
Exemplo n.º 7
0
    def test_span_abstract(self):
        span = BaseSpan()

        with self.assertRaises(NotImplementedError):
            span.span('root_span')
Exemplo n.º 8
0
 def test_context_manager_called(self, mock_enter, mock_exit):
     span = BaseSpan()
     with span:
         pass
     self.assertTrue(mock_enter.called)
     self.assertTrue(mock_exit.called)
Exemplo n.º 9
0
    def test_iter_abstract(self):
        span = BaseSpan()

        with self.assertRaises(NotImplementedError):
            list(iter(span))