File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
instrumentation/opentelemetry-instrumentation-sqlite3/tests Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 20
20
from opentelemetry .test .test_base import TestBase
21
21
22
22
23
+ class Data :
24
+ def __init__ (self ):
25
+ self ._connection = sqlite3 .connect (":memory:" )
26
+ self ._cursor = self ._connection .cursor ()
27
+
28
+ def __del__ (self ):
29
+ self ._cursor .close ()
30
+ self ._connection .close ()
31
+
32
+ def create_tables (self ):
33
+ stmt = "CREATE TABLE IF NOT EXISTS test (id integer)"
34
+ self ._cursor .execute (stmt )
35
+ self ._connection .commit ()
36
+
37
+
23
38
class TestSQLite3 (TestBase ):
24
39
def setUp (self ):
25
40
super ().setUp ()
@@ -100,3 +115,7 @@ def test_callproc(self):
100
115
):
101
116
self ._cursor .callproc ("test" , ())
102
117
self .validate_spans ("test" )
118
+
119
+ def test_baseinit (self ):
120
+ data = Data ()
121
+ data .create_tables ()
You can’t perform that action at this time.
0 commit comments