File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
opentelemetry-instrumentation/tests/auto_instrumentation Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 2
2
from unittest import TestCase
3
3
from unittest .mock import patch
4
4
5
- class TestSiteCustomize (TestCase ):
6
5
6
+ class TestSiteCustomize (TestCase ):
7
7
@classmethod
8
8
def setUpClass (cls ):
9
9
cls .load_configurators = patch (
@@ -24,15 +24,24 @@ def tearDownClass(cls):
24
24
def test_unset (self ):
25
25
if environ .get ("PYTHONPATH" ):
26
26
del environ ["PYTHONPATH" ] # enforce remove key/value from environ
27
- from opentelemetry .instrumentation .auto_instrumentation import sitecustomize
27
+ from opentelemetry .instrumentation .auto_instrumentation import (
28
+ sitecustomize ,
29
+ )
30
+
28
31
self .assertEqual (environ .get ("PYTHONPATH" ), None )
29
32
30
33
@patch .dict ("os.environ" , {"PYTHONPATH" : "" })
31
34
def test_empty (self ):
32
- from opentelemetry .instrumentation .auto_instrumentation import sitecustomize
35
+ from opentelemetry .instrumentation .auto_instrumentation import (
36
+ sitecustomize ,
37
+ )
38
+
33
39
self .assertEqual (environ ["PYTHONPATH" ], "" )
34
40
35
41
@patch .dict ("os.environ" , {"PYTHONPATH" : "abc" })
36
42
def test_set (self ):
37
- from opentelemetry .instrumentation .auto_instrumentation import sitecustomize
43
+ from opentelemetry .instrumentation .auto_instrumentation import (
44
+ sitecustomize ,
45
+ )
46
+
38
47
self .assertEqual (environ ["PYTHONPATH" ], "abc" )
You can’t perform that action at this time.
0 commit comments