File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
exporter/opentelemetry-exporter-otlp/tests Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 14
14
15
15
import unittest
16
16
17
+ from opentelemetry .exporter .otlp .proto .grpc ._log_exporter import (
18
+ OTLPLogExporter ,
19
+ )
17
20
from opentelemetry .exporter .otlp .proto .grpc .trace_exporter import (
18
21
OTLPSpanExporter ,
19
22
)
23
+ from opentelemetry .exporter .otlp .proto .http .trace_exporter import (
24
+ OTLPSpanExporter as HTTPSpanExporter ,
25
+ )
20
26
21
27
22
28
class TestOTLPExporters (unittest .TestCase ):
23
29
def test_constructors (self ):
24
- try :
25
- OTLPSpanExporter ()
26
- except Exception : # pylint: disable=broad-except
27
- self .fail (
28
- "Unexpected exception raised when instantiating OTLPSpanExporter"
29
- )
30
+ for exporter in [OTLPSpanExporter , HTTPSpanExporter , OTLPLogExporter ]:
31
+ try :
32
+ exporter ()
33
+ except Exception : # pylint: disable=broad-except
34
+ self .fail (
35
+ f"Unexpected exception raised when instantiating { exporter .__name__ } "
36
+ )
You can’t perform that action at this time.
0 commit comments