Skip to content

Commit

Permalink
Also use skipif
Browse files Browse the repository at this point in the history
  • Loading branch information
aliu39 committed Dec 19, 2024
1 parent 752ce7d commit d77ebc3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion tests/integrations/featureflags/test_featureflags.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import concurrent.futures as cf
import sys

import pytest

import sentry_sdk
Expand Down Expand Up @@ -78,10 +80,11 @@ def task(flag_key):
}


@pytest.mark.skipif(sys.version_info < (3, 7), reason="requires python3.7 or higher")
def test_featureflags_integration_asyncio(
sentry_init, capture_events, uninstall_integration
):
asyncio = pytest.importorskip("asyncio") # Only available in Python 3.7+.
asyncio = pytest.importorskip("asyncio")

uninstall_integration(FeatureFlagsIntegration.identifier)
sentry_init(integrations=[FeatureFlagsIntegration()])
Expand Down
5 changes: 4 additions & 1 deletion tests/integrations/launchdarkly/test_launchdarkly.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import concurrent.futures as cf
import sys

import ldclient
import pytest

Expand Down Expand Up @@ -107,12 +109,13 @@ def task(flag_key):
}


@pytest.mark.skipif(sys.version_info < (3, 7), reason="requires python3.7 or higher")
def test_launchdarkly_integration_asyncio(
sentry_init, capture_events, uninstall_integration
):
"""Assert concurrently evaluated flags do not pollute one another."""

asyncio = pytest.importorskip("asyncio") # Only available in Python 3.7+.
asyncio = pytest.importorskip("asyncio")

td = TestData.data_source()
client = LDClient(config=Config("sdk-key", update_processor_class=td))
Expand Down
5 changes: 4 additions & 1 deletion tests/integrations/openfeature/test_openfeature.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import concurrent.futures as cf
import sys

import pytest

from openfeature import api
Expand Down Expand Up @@ -91,12 +93,13 @@ def task(flag):
}


@pytest.mark.skipif(sys.version_info < (3, 7), reason="requires python3.7 or higher")
def test_openfeature_integration_asyncio(
sentry_init, capture_events, uninstall_integration
):
"""Assert concurrently evaluated flags do not pollute one another."""

asyncio = pytest.importorskip("asyncio") # Only available in Python 3.7+.
asyncio = pytest.importorskip("asyncio")

uninstall_integration(OpenFeatureIntegration.identifier)
sentry_init(integrations=[OpenFeatureIntegration()])
Expand Down

0 comments on commit d77ebc3

Please sign in to comment.