diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a3288a0..dca91a12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,6 +64,9 @@ jobs: echo "$HOME/bin" >> $GITHUB_PATH - name: tox 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 export TOXENV="py311-tf,py311-tf-keras" # full fi diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 821b3234..0eff5698 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: - numpy - pandas - pytest-timeout - - pytest-asyncio + - pytest-asyncio>0.21 - repo: https://github.com/PyCQA/flake8 rev: 7.1.1 hooks: diff --git a/pyproject.toml b/pyproject.toml index e69c3f68..ec1a63e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -121,6 +121,7 @@ markers = ["asyncio", "slow"] python_files = ["tests_*.py", "tests_*.ipynb"] testpaths = ["tests"] 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] branch = true