You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running make functional31 skips the test_build_and_deploy setup function and causes the rest of the tests to fail. Here's the relevant bits from the error log
tests/functional/test_charm.py::test_build_and_deploy
tests/functional/test_charm.py:43: PytestWarning: The test <Function test_build_and_deploy> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove the asyncio mark. If the test is not marked explicitly, check for global marks applied via 'pytestmark'.
@pytest.mark.abort_on_fail
tests/functional/test_charm.py::test_build_and_deploy
/home/dashmage/Canonical/repo/hardware-observer-operator/.tox/func31/lib/python3.11/site-packages/_pytest/python.py:183: PytestUnhandledCoroutineWarning: async def functions are not natively supported and have been skipped.
You need to install a suitable plugin for your async framework, for example:
- anyio
- pytest-asyncio
- pytest-tornasync
- pytest-trio
- pytest-twisted
warnings.warn(PytestUnhandledCoroutineWarning(msg.format(nodeid)))
Error can be seen in this failed CI run. On GitHub, the test is passing for make functional31 which isn't the case on my local.
The text was updated successfully, but these errors were encountered:
Possible source of error: pytest-asyncio has some breaking changes in v0.23.0 released on 12/03 and is used by pytest-operator internally.
This issue where it's also causing some unneccessary skips, has been fixed in v0.23.1. But even after using this latest version, I'm not able to get the func tests to work without adding pytestmark = pytest.mark.asyncio(scope="module") in the test.
Running
make functional31
skips thetest_build_and_deploy
setup function and causes the rest of the tests to fail. Here's the relevant bits from the error logError can be seen in this failed CI run. On GitHub, the test is passing for
make functional31
which isn't the case on my local.The text was updated successfully, but these errors were encountered: