Skip to content

Commit

Permalink
Test compatibility with Python 3.10 and 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
hennk authored and spoorn committed Apr 3, 2024
1 parent 87853f8 commit c649ad3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions devtool
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ test() {
PY_VERSION=$(python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))')

# Walkthrough tests
if [[ $PY_VERSION == "3.9" ]]; then
echo "== Python 3.9 Walkthrough Tests =="
if [[ $PY_VERSION =~ ^3\.(9|10|11)$ ]]; then
echo "== Python >= 3.9 Walkthrough Tests =="
cd test && pytest --pspec test_walkthrough.py ; cd -
elif [[ $PY_VERSION == "3.8" ]]; then
echo "== Python 3.8 Walkthrough Tests =="
Expand Down
8 changes: 6 additions & 2 deletions test/test_walkthrough.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os.path
import subprocess
import sys

import pkginfo

Expand Down Expand Up @@ -69,13 +70,16 @@ def test_positive_with_groups():
"pluggy (==1.0.0)",
"pycodestyle (==2.8.0)",
"pyflakes (==2.4.0)",
"exceptiongroup (==1.1.1)",
"pytest (==7.3.1)",
"pytz (==2023.3)",
"tomli (==2.0.1)",
"typing-extensions (==4.6.2)",
}

# These dependencies are only on Python < 3.11
if sys.version_info.major == 3 and sys.version_info.minor < 11:
expected.add("exceptiongroup (==1.1.1)")
expected.add("tomli (==2.0.1)")

# These dependencies are only on Windows
if os.name == "nt":
expected.add("colorama (==0.4.6)")
Expand Down

0 comments on commit c649ad3

Please sign in to comment.