Skip to content

Commit

Permalink
tests: Add py3.11 to test-common (#1871)
Browse files Browse the repository at this point in the history
* tests: Add py3.11 to test-common

* fix 3.11 test

* run black
  • Loading branch information
Zylphrex committed Jan 30, 2023
1 parent b09ff78 commit 89a602b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# ubuntu-20.04 is the last version that supported python3.6
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
services:
postgres:
image: postgres
Expand Down
8 changes: 7 additions & 1 deletion tests/test_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,13 @@ def test_extract_stack_with_max_depth(depth, max_stack_depth, actual_depth):

# index 0 contains the inner most frame on the stack, so the lamdba
# should be at index `actual_depth`
assert stack[actual_depth][3] == "<lambda>", actual_depth
if sys.version_info >= (3, 11):
assert (
stack[actual_depth][3]
== "test_extract_stack_with_max_depth.<locals>.<lambda>"
), actual_depth
else:
assert stack[actual_depth][3] == "<lambda>", actual_depth


def test_extract_stack_with_cache():
Expand Down

0 comments on commit 89a602b

Please sign in to comment.