@@ -23,7 +23,7 @@ def test_session(
2323) -> None :
2424 result , spans = pytester_with_spans ()
2525 s = spans ["pytest session start" ]
26- assert s .attributes == {"test.type " : "session" }
26+ assert s .attributes == {"test.scope " : "session" }
2727 assert s .status .status_code == opentelemetry .trace .StatusCode .OK
2828
2929
@@ -32,7 +32,7 @@ def test_session_fail(
3232) -> None :
3333 result , spans = pytester_with_spans ("def test_fail(): assert False" )
3434 s = spans ["pytest session start" ]
35- assert s .attributes == {"test.type " : "session" }
35+ assert s .attributes == {"test.scope " : "session" }
3636 assert s .status .status_code == opentelemetry .trace .StatusCode .ERROR
3737
3838
@@ -43,7 +43,7 @@ def test_test(
4343 session_span = spans ["pytest session start" ]
4444
4545 assert spans ["test_test.py::test_pass" ].attributes == {
46- "test.type " : "case" ,
46+ "test.scope " : "case" ,
4747 "code.function" : "test_pass" ,
4848 "code.lineno" : 0 ,
4949 "code.filepath" : "test_test.py" ,
@@ -69,7 +69,7 @@ def test_test_failure(
6969
7070 assert spans ["test_test_failure.py::test_error" ].attributes == {
7171 "test.case.result.status" : "failed" ,
72- "test.type " : "case" ,
72+ "test.scope " : "case" ,
7373 "code.function" : "test_error" ,
7474 "code.lineno" : 0 ,
7575 "code.filepath" : "test_test_failure.py" ,
@@ -110,7 +110,7 @@ def test_skipped():
110110
111111 assert spans ["test_test_skipped.py::test_skipped" ].attributes == {
112112 "test.case.result.status" : "skipped" ,
113- "test.type " : "case" ,
113+ "test.scope " : "case" ,
114114 "code.function" : "test_skipped" ,
115115 "code.lineno" : 1 ,
116116 "code.filepath" : "test_test_skipped.py" ,
@@ -146,7 +146,7 @@ def test_pass(myfix): pass
146146 assert name in spans
147147
148148 assert spans ["myfix setup" ].attributes == {
149- "test.type " : "fixture" ,
149+ "test.scope " : "fixture" ,
150150 "code.function" : "myfix" ,
151151 "code.lineno" : 2 ,
152152 "code.filepath" : anys .ANY_STR ,
@@ -160,7 +160,7 @@ def test_pass(myfix): pass
160160 )
161161
162162 assert spans ["myfix teardown" ].attributes == {
163- "test.type " : "fixture" ,
163+ "test.scope " : "fixture" ,
164164 "code.function" : "myfix" ,
165165 "code.lineno" : 2 ,
166166 "code.filepath" : anys .ANY_STR ,
@@ -193,7 +193,7 @@ def test_pass(myfix): pass
193193 assert name in spans
194194
195195 assert spans ["myfix setup" ].attributes == {
196- "test.type " : "fixture" ,
196+ "test.scope " : "fixture" ,
197197 "code.function" : "myfix" ,
198198 "code.lineno" : 2 ,
199199 "code.filepath" : anys .ANY_STR ,
@@ -209,7 +209,7 @@ def test_pass(myfix): pass
209209 )
210210
211211 assert spans ["myfix teardown" ].attributes == {
212- "test.type " : "fixture" ,
212+ "test.scope " : "fixture" ,
213213 "code.function" : "myfix" ,
214214 "code.lineno" : 2 ,
215215 "code.filepath" : anys .ANY_STR ,
@@ -224,7 +224,7 @@ def test_pass(myfix): pass
224224 )
225225
226226 assert spans ["test_fixture_failure.py::test_pass" ].attributes == {
227- "test.type " : "case" ,
227+ "test.scope " : "case" ,
228228 "code.function" : "test_pass" ,
229229 "code.lineno" : 3 ,
230230 "code.filepath" : "test_fixture_failure.py" ,
0 commit comments