canonical / charm-sysconfig

A subordinate charm to apply system settings like grub configurations or systemd configurations.
Apache License 2.0
0 stars 5 forks source link

Update pytest fixture for async functions #35

Closed dashmage closed 8 months ago

dashmage commented 8 months ago

Starting from pytest-asyncio's most recent release (version 0.19.0), strict mode is enforced by default 1, which requires the usage of @pytest.mark.asyncio and @pytest_asyncio.fixture 2. Without these markers, tests and fixtures are not considered as asyncio-driven, resulting functional tests failures.

For charms using pytest framework, we need to update their functional tests by replacing the current used @pytest.fixture with @pytest_asyncio.fixture in test files.


Imported from Launchpad using lp2gh.