From a4d019f8e02a89dc482adc4203216bde0a1c5778 Mon Sep 17 00:00:00 2001 From: Michal Charemza Date: Fri, 20 Sep 2024 16:58:59 +0100 Subject: [PATCH] tests: fix for release candidates (and test on more versions of Python) Fixes https://github.com/uktrade/stream-zip/issues/146 --- .github/workflows/test.yml | 8 +++++++- test_stream_zip.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4de9397..25e1e33 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,11 +24,17 @@ jobs: os: "ubuntu-20.04" - python-version: "3.10.0" os: "ubuntu-20.04" + # - python-version: "3.11.10" + # os: "ubuntu-20.04" + - python-version: "3.12.0" + os: "ubuntu-20.04" + - python-version: "3.13.0-rc.2" + os: "ubuntu-20.04" runs-on: ${{ matrix.os }} steps: - name: "Checkout" uses: "actions/checkout@v3" - - uses: "actions/setup-python@v4" + - uses: "actions/setup-python@v5" with: python-version: '${{ matrix.python-version }}' - name: "Install bsdcpio" diff --git a/test_stream_zip.py b/test_stream_zip.py index 8c06617..eb378fd 100644 --- a/test_stream_zip.py +++ b/test_stream_zip.py @@ -1388,7 +1388,7 @@ async def test(): @pytest.mark.skipif( - tuple(int(v) for v in platform.python_version().split('.')) < (3,7,0), + tuple(int(v) for v in platform.python_version().split('.')[:2]) < (3,7,0), reason="contextvars are not supported before Python 3.7.0", ) def test_copy_of_context_variable_available_in_iterable():