File tree Expand file tree Collapse file tree
ext/opentelemetry-ext-flask/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515from logging import NOTSET , WARNING , disable
16- from unittest import main
17-
18- # This is used instead of from flask import Flask, request because if not then
19- # FlaskInstrumentor().instrument() would need to be called before importing
20- # Flask. This is just an intrinsic limitation due the fact that we are testing
21- # the instrumentor in a way that mimics how it would be called with the
22- # opentelemetry-auto-instrumentation command. This does not mean that the
23- # instrumentor should be used in this way in end user applications. For those
24- # cases, FlaskInstrumentor.instrument(app=app) should be used.
16+
2517import flask
2618from werkzeug .test import Client
2719from werkzeug .wrappers import BaseResponse
@@ -92,7 +84,3 @@ def hello_endpoint(helloid):
9284 self .assertEqual (span_list [0 ].name , "hello_endpoint" )
9385 self .assertEqual (span_list [0 ].kind , trace_api .SpanKind .SERVER )
9486 self .assertEqual (span_list [0 ].attributes , expected_attrs )
95-
96-
97- if __name__ == "__main__" :
98- main ()
Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515from logging import NOTSET , WARNING , disable
16- from unittest import main
1716
1817from flask import Flask
1918from werkzeug .test import Client
@@ -75,7 +74,3 @@ def test_uninstrument(self):
7574 self .assertEqual (span_list [0 ].name , "hello_endpoint" )
7675 self .assertEqual (span_list [0 ].kind , trace_api .SpanKind .SERVER )
7776 self .assertEqual (span_list [0 ].attributes , expected_attrs )
78-
79-
80- if __name__ == "__main__" :
81- main ()
You can’t perform that action at this time.
0 commit comments