Skip to content

Commit 89a602b

Browse files
authored
tests: Add py3.11 to test-common (getsentry#1871)
* tests: Add py3.11 to test-common * fix 3.11 test * run black
1 parent b09ff78 commit 89a602b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/test-common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
# ubuntu-20.04 is the last version that supported python3.6
3030
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
3131
os: [ubuntu-20.04]
32-
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
32+
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
3333
services:
3434
postgres:
3535
image: postgres

tests/test_profiler.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,13 @@ def test_extract_stack_with_max_depth(depth, max_stack_depth, actual_depth):
302302

303303
# index 0 contains the inner most frame on the stack, so the lamdba
304304
# should be at index `actual_depth`
305-
assert stack[actual_depth][3] == "<lambda>", actual_depth
305+
if sys.version_info >= (3, 11):
306+
assert (
307+
stack[actual_depth][3]
308+
== "test_extract_stack_with_max_depth.<locals>.<lambda>"
309+
), actual_depth
310+
else:
311+
assert stack[actual_depth][3] == "<lambda>", actual_depth
306312

307313

308314
def test_extract_stack_with_cache():

0 commit comments

Comments
 (0)