Skip to content
Snippets Groups Projects
Commit 2781d994 authored by dboe's avatar dboe
Browse files

explicit pytest path to .tox dir solves the issue

parent 01a5f2be
No related branches found
No related tags found
No related merge requests found
Pipeline #117376 failed
...@@ -36,8 +36,6 @@ dist: ...@@ -36,8 +36,6 @@ dist:
- python setup.py bdist_wheel - python setup.py bdist_wheel
# an alternative approach is to install and run: # an alternative approach is to install and run:
- pip install dist/* - pip install dist/*
# remove build directory in order to prevent ImportPathMismatchError
- rm -rf build
artifacts: artifacts:
paths: paths:
- dist/*.whl - dist/*.whl
......
...@@ -125,21 +125,26 @@ build-dir = docs/_build ...@@ -125,21 +125,26 @@ build-dir = docs/_build
source-dir = docs source-dir = docs
[tool:pytest] [tool:pytest]
addopts = --doctest-modules addopts =
--doctest-modules
junit_family = xunit2 junit_family = xunit2
[tox:tox] [tox:tox]
minversion = 3.7 minversion = 3.7
skip_missing_interpreters = true skip_missing_interpreters = true
envlist = envlist =
py{38,39} py{35,36,37,38,39,310}
recreate = true recreate = true
usedevelop = true usedevelop = true
[gh-actions] [gh-actions]
python = python =
3.5: py35
3.6: py36
3.7: py37
3.8: py38 3.8: py38
3.9: py39 3.9: py39
3.10: py310
[testenv] [testenv]
description = run test suite under {basepython} description = run test suite under {basepython}
...@@ -152,7 +157,8 @@ commands_pre = ...@@ -152,7 +157,8 @@ commands_pre =
rm -rf **/__pycache__ rm -rf **/__pycache__
rm -rf **/*.pyc rm -rf **/*.pyc
commands = commands =
pytest \ pytest {envsitepackagesdir}/tfields \ # prevent ImportPathMismatchError https://tox.wiki/en/latest/example/pytest.html
--basetemp="{envtmpdir}" {posargs}
--cov={[metadata]name} \ --cov={[metadata]name} \
--ignore=docs \ --ignore=docs \
--junitxml=report/junit.xml --junitxml=report/junit.xml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment