]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
test: squelch asyncio io warning
authorJoerg Behrmann <behrmann@physik.fu-berlin.de>
Thu, 14 Apr 2022 11:33:31 +0000 (13:33 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 14 Apr 2022 17:42:27 +0000 (19:42 +0200)
This silences the deprecation warning

     The 'asyncio_mode' default value will change to 'strict' in
     future, please explicitly use 'asyncio_mode=strict' or
     'asyncio_mode=auto' in pytest configuration file.

The difference is whether pytest considers async tests to be
asyncio-driven even when they are not marked @pytest.mark.asyncio
with 'auto' meaning yes, consider them even when not marked, and
'strict' requiring the marking.

This doesn't really make a difference for us, since we don't have
any async tests, but it's nevertheless nice to silence the warning.

pyproject.toml

index 6dcacadc474558b9e07eeb83f65dc3b63ff3f03c..cd461cf7e1f87460811b937baff018cc23d027bf 100644 (file)
@@ -9,3 +9,6 @@ py_version = "37"
 
 [tool.pyright]
 pythonVersion = "3.7"
+
+[tool.pytest.ini_options]
+asyncio_mode = "auto"