Skip to content

Commit 8d9838b

Browse files
committed
xfail compat tests
1 parent 83d9a79 commit 8d9838b

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

tests/new_scopes_compat/test_new_scopes_compat.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import pytest
2+
13
import sentry_sdk
24
from sentry_sdk.hub import Hub
35

@@ -11,6 +13,7 @@
1113
"""
1214

1315

16+
@pytest.mark.xfail("will be removed in 3.0")
1417
def test_configure_scope_sdk1(sentry_init, capture_events):
1518
"""
1619
Mutate data in a `with configure_scope` block.
@@ -40,6 +43,7 @@ def test_configure_scope_sdk1(sentry_init, capture_events):
4043
assert event_z["tags"] == {"A": 1, "B1": 1, "B2": 1, "Z": 1}
4144

4245

46+
@pytest.mark.xfail("will be removed in 3.0")
4347
def test_push_scope_sdk1(sentry_init, capture_events):
4448
"""
4549
Mutate data in a `with push_scope` block
@@ -69,6 +73,7 @@ def test_push_scope_sdk1(sentry_init, capture_events):
6973
assert event_z["tags"] == {"A": 1, "Z": 1}
7074

7175

76+
@pytest.mark.xfail("will be removed in 3.0")
7277
def test_with_hub_sdk1(sentry_init, capture_events):
7378
"""
7479
Mutate data in a `with Hub:` block
@@ -98,6 +103,7 @@ def test_with_hub_sdk1(sentry_init, capture_events):
98103
assert event_z["tags"] == {"A": 1, "B1": 1, "B2": 1, "Z": 1}
99104

100105

106+
@pytest.mark.xfail("will be removed in 3.0")
101107
def test_with_hub_configure_scope_sdk1(sentry_init, capture_events):
102108
"""
103109
Mutate data in a `with Hub:` containing a `with configure_scope` block
@@ -141,6 +147,7 @@ def test_with_hub_configure_scope_sdk1(sentry_init, capture_events):
141147
}
142148

143149

150+
@pytest.mark.xfail("will be removed in 3.0")
144151
def test_with_hub_push_scope_sdk1(sentry_init, capture_events):
145152
"""
146153
Mutate data in a `with Hub:` containing a `with push_scope` block
@@ -176,6 +183,7 @@ def test_with_hub_push_scope_sdk1(sentry_init, capture_events):
176183
assert event_z["tags"] == {"A": 1, "B1": 1, "B5": 1, "Z": 1}
177184

178185

186+
@pytest.mark.xfail("will be removed in 3.0")
179187
def test_with_cloned_hub_sdk1(sentry_init, capture_events):
180188
"""
181189
Mutate data in a `with cloned Hub:` block
@@ -205,6 +213,7 @@ def test_with_cloned_hub_sdk1(sentry_init, capture_events):
205213
assert event_z["tags"] == {"A": 1, "Z": 1}
206214

207215

216+
@pytest.mark.xfail("will be removed in 3.0")
208217
def test_with_cloned_hub_configure_scope_sdk1(sentry_init, capture_events):
209218
"""
210219
Mutate data in a `with cloned Hub:` containing a `with configure_scope` block
@@ -240,6 +249,7 @@ def test_with_cloned_hub_configure_scope_sdk1(sentry_init, capture_events):
240249
assert event_z["tags"] == {"A": 1, "Z": 1}
241250

242251

252+
@pytest.mark.xfail("will be removed in 3.0")
243253
def test_with_cloned_hub_push_scope_sdk1(sentry_init, capture_events):
244254
"""
245255
Mutate data in a `with cloned Hub:` containing a `with push_scope` block

tests/new_scopes_compat/test_new_scopes_compat_event.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ def _init_sentry_sdk(sentry_init):
330330
#
331331

332332

333+
@pytest.mark.xfail("will be removed in 3.0")
333334
def test_event(sentry_init, capture_envelopes, expected_error, expected_transaction):
334335
_init_sentry_sdk(sentry_init)
335336

@@ -359,6 +360,7 @@ def test_event(sentry_init, capture_envelopes, expected_error, expected_transact
359360
assert attachment.payload.bytes == b"Hello World"
360361

361362

363+
@pytest.mark.xfail("will be removed in 3.0")
362364
def test_event2(sentry_init, capture_envelopes, expected_error, expected_transaction):
363365
_init_sentry_sdk(sentry_init)
364366

@@ -395,6 +397,7 @@ def test_event2(sentry_init, capture_envelopes, expected_error, expected_transac
395397
assert attachment.payload.bytes == b"Hello World"
396398

397399

400+
@pytest.mark.xfail("will be removed in 3.0")
398401
def test_event3(sentry_init, capture_envelopes, expected_error, expected_transaction):
399402
_init_sentry_sdk(sentry_init)
400403

@@ -431,6 +434,7 @@ def test_event3(sentry_init, capture_envelopes, expected_error, expected_transac
431434
assert attachment.payload.bytes == b"Hello World"
432435

433436

437+
@pytest.mark.xfail("will be removed in 3.0")
434438
def test_event4(sentry_init, capture_envelopes, expected_error, expected_transaction):
435439
_init_sentry_sdk(sentry_init)
436440

@@ -467,6 +471,7 @@ def test_event4(sentry_init, capture_envelopes, expected_error, expected_transac
467471
assert attachment.payload.bytes == b"Hello World"
468472

469473

474+
@pytest.mark.xfail("will be removed in 3.0")
470475
def test_event5(sentry_init, capture_envelopes, expected_error, expected_transaction):
471476
_init_sentry_sdk(sentry_init)
472477

tests/test_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,14 @@ def test_set_tags(sentry_init, capture_events):
185185
}, "Updating tags with empty dict changed tags"
186186

187187

188+
@pytest.mark.xfail("configure_scope will be removed in 3.0")
188189
def test_configure_scope_deprecation():
189190
with pytest.warns(DeprecationWarning):
190191
with configure_scope():
191192
...
192193

193194

195+
@pytest.mark.xfail("push_scope will be removed in 3.0")
194196
def test_push_scope_deprecation():
195197
with pytest.warns(DeprecationWarning):
196198
with push_scope():

tests/test_transport.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ def test_metric_bucket_limits_with_all_namespaces(
649649
]
650650

651651

652+
@pytest.mark.xfail("hub will be removed in 3.0")
652653
def test_hub_cls_backwards_compat():
653654
class TestCustomHubClass(Hub):
654655
pass

0 commit comments

Comments
 (0)