Skip to content

Commit

Permalink
Add python 3.9 and 3.10 to tox.ini, recover doctest in tox. Move igno…
Browse files Browse the repository at this point in the history
…re-glob to pytest.ini
  • Loading branch information
arturponinski committed Feb 1, 2022
1 parent 7e317f8 commit 4631647
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
python -m pip install --prefer-binary -r requirements-formats.txt
echo "::endgroup::"
echo "::group::Perform doctest-modules execution with coverage"
pytest --doctest-modules --ignore-glob='*_py2.py' --ignore-glob='petl/io/db.py' --cov=petl petl
pytest --doctest-modules --cov=petl petl
echo "::endgroup::"
- name: Coveralls
Expand Down
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[pytest]
log_level=DEBUG
doctest_optionflags = NORMALIZE_WHITESPACE ALLOW_UNICODE
addopts = --ignore-glob=*_py2.py --ignore-glob=petl/io/db.py
16 changes: 4 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,18 @@
# and then run "tox" from this directory.

[tox]
envlist = py27, py36, py37, py38, py39, {py36,py37,py38}-docs
# trick to enable pre-installation of numpy and numexpr
indexserver =
preinstall1 = https://pypi.org/simple
preinstall2 = https://pypi.org/simple
envlist = py27, py36, py37, py38, py39, py310, {py36,py37,py38,py39,py310}-docs

[testenv]
# get stable output for unordered types
setenv =
PYTHONHASHSEED = 42
py27: PY_MAJOR_VERSION = py2
py36,py37,py38,py39: PY_MAJOR_VERSION = py3
py36,py37,py38,py39,py310: PY_MAJOR_VERSION = py3
commands =
pytest --cov=petl petl
coverage report -m
deps =
:preinstall1: Cython<=0.29.21,>=0.29.13
:preinstall1: numpy<=1.19.2,>=1.16.4
:preinstall2: numexpr<=2.7.1,>=2.6.9
-rrequirements-tests.txt
-rrequirements-formats.txt

Expand All @@ -34,10 +27,9 @@ deps =
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html

[testenv:{py36,py37,py38}-doctest]
[testenv:{py36,py37,py38,py39,py310}-doctest]
commands =
py36,py37,py38: nosetests -v --with-doctest --doctest-options=+NORMALIZE_WHITESPACE petl -I"csv_py2\.py" -I"db\.py"

py36,py37,py38,py39,py310: pytest --doctest-modules --cov=petl petl
[testenv:{py36,py37,py38,py39}-dochtml]
changedir = docs
deps =
Expand Down

0 comments on commit 4631647

Please sign in to comment.