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 2020from opentelemetry .test .test_base import TestBase
2121
2222
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+
2338class TestSQLite3 (TestBase ):
2439 def setUp (self ):
2540 super ().setUp ()
@@ -100,3 +115,7 @@ def test_callproc(self):
100115 ):
101116 self ._cursor .callproc ("test" , ())
102117 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