Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-vuillemot committed Jan 30, 2025
1 parent 4b198ed commit be58b8f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ jobs:
write:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
cshelve-version: ["0.9.0"]
max-parallel: 1

runs-on: ${{ matrix.os }}
timeout-minutes: 10
Expand All @@ -81,7 +80,7 @@ jobs:
- name: Write
working-directory: compatibility
run: |
python3 write.py ${{ matrix.cshelve-version }}
python3 write.py "${{ matrix.cshelve-version }}" "${{ matrix.python-version }}"
versions:
needs: write
Expand Down Expand Up @@ -117,7 +116,11 @@ jobs:
- name: Read
working-directory: compatibility
run: |
python3 read.py ${{ matrix.cshelve-version }}
python3 read.py "${{ matrix.cshelve-version }}" "3.9"
python3 read.py "${{ matrix.cshelve-version }}" "3.10"
python3 read.py "${{ matrix.cshelve-version }}" "3.11"
python3 read.py "${{ matrix.cshelve-version }}" "3.12"
python3 read.py "${{ matrix.cshelve-version }}" "3.13"
latest:
needs: build
Expand All @@ -126,6 +129,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
cshelve-version: ["0.9.0"]
max-parallel: 1

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -162,4 +166,8 @@ jobs:
- name: Read
working-directory: compatibility
run: |
python3 read.py ${{ matrix.cshelve-version }}
python3 read.py "${{ matrix.cshelve-version }}" "3.9"
python3 read.py "${{ matrix.cshelve-version }}" "3.10"
python3 read.py "${{ matrix.cshelve-version }}" "3.11"
python3 read.py "${{ matrix.cshelve-version }}" "3.12"
python3 read.py "${{ matrix.cshelve-version }}" "3.13"
7 changes: 5 additions & 2 deletions compatibility/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import cshelve


version = sys.argv[1]
cshelve_version = sys.argv[1]
python_version = sys.argv[2]

with cshelve.open("./azure-passwordless.ini") as db:
db[f"compatibility-{version}"] = f"my complex data from version {version}"
db[
f"compatibility-{cshelve_version}-{python_version}"
] = f"my complex data from cshelve version {cshelve_version} and python {python_version}"

0 comments on commit be58b8f

Please sign in to comment.