fix pytest deprecation warning

This commit is contained in:
Casper da Costa-Luis 2024-10-28 01:05:33 +00:00
parent 2575c15c18
commit eed9be2add
No known key found for this signature in database
GPG Key ID: F5126E5FBD2512AD
3 changed files with 5 additions and 1 deletions

View File

@ -64,6 +64,9 @@ jobs:
echo "$HOME/bin" >> $GITHUB_PATH echo "$HOME/bin" >> $GITHUB_PATH
- name: tox - name: tox
run: | run: |
if test "py${{ matrix.python }}" = py3.7; then
sed -i /asyncio_default_fixture_loop_scope/d pyproject.toml
fi
if [[ "py${{ matrix.python }}-${{ matrix.os }}" = "py3.11-ubuntu" ]]; then if [[ "py${{ matrix.python }}-${{ matrix.os }}" = "py3.11-ubuntu" ]]; then
export TOXENV="py311-tf,py311-tf-keras" # full export TOXENV="py311-tf,py311-tf-keras" # full
fi fi

View File

@ -37,7 +37,7 @@ repos:
- numpy - numpy
- pandas - pandas
- pytest-timeout - pytest-timeout
- pytest-asyncio - pytest-asyncio>0.21
- repo: https://github.com/PyCQA/flake8 - repo: https://github.com/PyCQA/flake8
rev: 7.1.1 rev: 7.1.1
hooks: hooks:

View File

@ -121,6 +121,7 @@ markers = ["asyncio", "slow"]
python_files = ["tests_*.py", "tests_*.ipynb"] python_files = ["tests_*.py", "tests_*.ipynb"]
testpaths = ["tests"] testpaths = ["tests"]
addopts = "-v --tb=short -rxs -W=error --durations=0 --durations-min=0.1 --asyncio-mode=strict" addopts = "-v --tb=short -rxs -W=error --durations=0 --durations-min=0.1 --asyncio-mode=strict"
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.run] [tool.coverage.run]
branch = true branch = true