Skip to content

Commit 33880a3

Browse files
Use pytest to skip profiling test
1 parent a1aed17 commit 33880a3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_wrapper.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import unittest
55
import importlib
66
import sys
7+
import pytest
78

89
from unittest.mock import MagicMock, patch, call, ANY
910
from datadog_lambda.constants import TraceHeader
@@ -835,10 +836,10 @@ def lambda_handler(event, context):
835836

836837

837838
@patch("datadog_lambda.config.Config.profiling_enabled", True)
839+
@pytest.mark.skipif(
840+
sys.version_info >= (3, 14), reason="profiling not yet supported in python 3.14"
841+
)
838842
def test_profiling_enabled(monkeypatch):
839-
if sys.version_info >= (3, 14, 0):
840-
return
841-
842843
importlib.reload(wrapper)
843844

844845
original_Profiler_start = wrapper.profiler.Profiler.start

0 commit comments

Comments
 (0)