Skip to content

Commit

Permalink
Update pytest and pytest-aiohttp
Browse files Browse the repository at this point in the history
Newer pytest requires a plugin to run async test functions.
pytest-asyncio will be installed as a dependency of newer
pytest-aiohttp, but the tests aren't automatically marked for use with
pytest-asyncio. Explicitly add pytest-asyncio and configure it for auto
mode[1] so it does that.

1. https://pytest-asyncio.readthedocs.io/en/latest/concepts.html#auto-mode
  • Loading branch information
dbnicholson committed May 22, 2024
1 parent 5bab36d commit 2b447e7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
5 changes: 3 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ flake8 = "*"
flake8-bugbear = "*"
freezegun = "*"
mypy = ">=0.720, < 0.920"
pytest = "~= 6.2"
pytest-aiohttp = "~= 0.3"
pytest = "*"
pytest-aiohttp = "*"
pytest-asyncio = "*"
pytest-cov = "*"
types-toml = "*"

Expand Down
34 changes: 18 additions & 16 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ warn_unused_ignores = True
disallow_untyped_defs = False

[tool:pytest]
asyncio_mode = auto
filterwarnings =
error::DeprecationWarning:azafea_metrics_proxy.*
ignore::DeprecationWarning:distutils.*
Expand Down

0 comments on commit 2b447e7

Please sign in to comment.