2
2
import os
3
3
4
4
import asyncpg
5
- import pytest
6
5
7
6
from opentelemetry .ext .asyncpg import AsyncPGInstrumentor
8
7
from opentelemetry .test .test_base import TestBase
@@ -42,7 +41,6 @@ def setUpClass(cls):
42
41
def tearDownClass (cls ):
43
42
AsyncPGInstrumentor ().uninstrument ()
44
43
45
- @pytest .mark .asyncpg
46
44
def test_instrumented_execute_method_without_arguments (self , * _ , ** __ ):
47
45
_await (self ._connection .execute ("SELECT 42;" ))
48
46
spans = self .memory_exporter .get_finished_spans ()
@@ -60,7 +58,6 @@ def test_instrumented_execute_method_without_arguments(self, *_, **__):
60
58
},
61
59
)
62
60
63
- @pytest .mark .asyncpg
64
61
def test_instrumented_execute_method_with_arguments (self , * _ , ** __ ):
65
62
_await (self ._connection .execute ("SELECT $1;" , "1" ))
66
63
spans = self .memory_exporter .get_finished_spans ()
@@ -79,7 +76,6 @@ def test_instrumented_execute_method_with_arguments(self, *_, **__):
79
76
},
80
77
)
81
78
82
- @pytest .mark .asyncpg
83
79
def test_instrumented_fetch_method_without_arguments (self , * _ , ** __ ):
84
80
_await (self ._connection .fetch ("SELECT 42;" ))
85
81
spans = self .memory_exporter .get_finished_spans ()
@@ -94,7 +90,6 @@ def test_instrumented_fetch_method_without_arguments(self, *_, **__):
94
90
},
95
91
)
96
92
97
- @pytest .mark .asyncpg
98
93
def test_instrumented_fetch_method_with_arguments (self , * _ , ** __ ):
99
94
_await (self ._connection .fetch ("SELECT $1;" , "1" ))
100
95
spans = self .memory_exporter .get_finished_spans ()
@@ -110,7 +105,6 @@ def test_instrumented_fetch_method_with_arguments(self, *_, **__):
110
105
},
111
106
)
112
107
113
- @pytest .mark .asyncpg
114
108
def test_instrumented_executemany_method_with_arguments (self , * _ , ** __ ):
115
109
_await (self ._connection .executemany ("SELECT $1;" , [["1" ], ["2" ]]))
116
110
spans = self .memory_exporter .get_finished_spans ()
@@ -126,7 +120,6 @@ def test_instrumented_executemany_method_with_arguments(self, *_, **__):
126
120
spans [0 ].attributes ,
127
121
)
128
122
129
- @pytest .mark .asyncpg
130
123
def test_instrumented_execute_interface_error_method (self , * _ , ** __ ):
131
124
with self .assertRaises (asyncpg .InterfaceError ):
132
125
_await (self ._connection .execute ("SELECT 42;" , 1 , 2 , 3 ))
@@ -143,7 +136,6 @@ def test_instrumented_execute_interface_error_method(self, *_, **__):
143
136
},
144
137
)
145
138
146
- @pytest .mark .asyncpg
147
139
def test_instrumented_transaction_method (self , * _ , ** __ ):
148
140
async def _transaction_execute ():
149
141
async with self ._connection .transaction ():
@@ -190,7 +182,6 @@ async def _transaction_execute():
190
182
StatusCanonicalCode .OK , spans [2 ].status .canonical_code
191
183
)
192
184
193
- @pytest .mark .asyncpg
194
185
def test_instrumented_failed_transaction_method (self , * _ , ** __ ):
195
186
async def _transaction_execute ():
196
187
async with self ._connection .transaction ():
0 commit comments