Skip to content

Commit a9f1f20

Browse files
committed
Moving to tox for testing
1 parent eb0d1fc commit a9f1f20

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: [ '3.10', '3.11']
14+
python-version: [ '3.10', '3.11', '3.12', '3.13']
1515
name: Python ${{ matrix.python-version }} sample
1616
steps:
1717
- uses: actions/checkout@v4
@@ -26,19 +26,15 @@ jobs:
2626
path: ${{ env.pythonLocation }}
2727
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('dev-requirements.txt') }}
2828

29-
- name: Install setup tools
30-
run: pip install setuptools
31-
3229
- name: Install
33-
run: python setup.py install
30+
run: python -m pip install -U tox
3431

3532
- name: Test
36-
run: python -m unittest discover -s tests -p "test*.py"
33+
run: tox
3734

3835
- name: install coveralls
3936
run: pip install coveralls
4037

41-
4238
- name: Generate coverage
4339
run: coverage run --include=iiif-presentation-validator.py setup.py test
4440

tests/test_validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Test code for iiif-presentation-validator.py."""
22
import unittest
3-
from mock import Mock
3+
from unittest.mock import Mock
44
try:
55
import imp
66
except ImportError:

tox.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[tox]
2+
envlist = py311
3+
4+
[testenv]
5+
commands =
6+
python -m unittest discover -s tests -p "test*.py"

0 commit comments

Comments
 (0)