Skip to content

Commit 6046dca

Browse files
committed
Switch tests to tox
1 parent 4bb123d commit 6046dca

File tree

4 files changed

+29
-11
lines changed

4 files changed

+29
-11
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ python:
44
- '3.6'
55
- '3.7'
66
- "3.8"
7+
- "pypy3"
78
install:
8-
- pip install coveralls -r tests/requirements.txt
9-
script:
10-
- pytest --cov=domdf_python_tools tests/
9+
- pip install coveralls tox tox-travis
10+
script:
11+
- tox
1112
after_success:
1213
- coveralls
1314
deploy:

domdf_python_tools/pagesizes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#
3636

3737

38-
from collections import Sequence
38+
from collections.abc import Sequence
3939
import re
4040

4141

tests/test_pagesizes.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
88
"""
99

10-
import types
11-
import pathlib
12-
import decimal
13-
14-
import pytest
15-
16-
from domdf_python_tools.utils import str2tuple, tuple2str, chunks, list2str, list2string, bdict, pyversion
1710
from domdf_python_tools.pagesizes import *
1811

1912

tox.ini

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This file must be in the dir as setup.py
2+
[tox]
3+
envlist = py{36,37,38,py3}
4+
skip_missing_interpreters = True
5+
requires = pip >= 19.0.0
6+
7+
8+
[build-system]
9+
requires = [
10+
setuptools >= 46.1.3
11+
wheel >= 0.34.2
12+
]
13+
build-backend = "setuptools"
14+
15+
16+
[testenv]
17+
description = pytest
18+
# Install test requirements
19+
deps = -r{toxinidir}/tests/requirements.txt
20+
21+
commands =
22+
python --version
23+
; Run tests
24+
python -m pytest --cov=domdf_python_tools tests/

0 commit comments

Comments
 (0)