Closed Tiboris closed 2 years ago
WDYT about having a unit test for this transformation?
I have
The added tests are skipped as seen here
('/opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/site-packages/_pytest/python.py', 182, 'Skipped: async def function and no async plugin installed (see warnings)')
Based on the warnings, asyncio
plugin is missing. I don't see pytest-asyncio
listed in the requirements.txt
, which may be the core of a problem
@miskopo we have the test-requirements file for the testing requirements with the pytest-asyncio>=0.14.0 pinned.
In that case, either add --asyncio-mode=auto
to the pytest
invocation, which will use asyncio
on all async
functions, or, use --asyncio-mode=strict
and add decorator @pytest.mark.asyncio
to test on line 82
I seee....
SKIPPED [3] ../../../../../opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/site-packages/_pytest/python.py:182: async def function and no async plugin installed (see warnings)
So skips are not treated as failures in our pipelines.
@miskopo I have added @pytest.mark.asyncio to the test
There were still warning:
##[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.
So i added another commit
@miskopo even with latest commit there is still
=============================== warnings summary ===============================
../../../../../opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/site-packages/pytest_asyncio/plugin.py:191
/opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/site-packages/pytest_asyncio/plugin.py:191: DeprecationWarning: 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.
config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
any tips how to get rid of it?
yes, you can get rid of it by stating in pytest.ini
[pytest]
asyncio_mode = strict
I have re-pushed with the pytest.ini change.
Before this patch the distro variant could not be configured and was hardcoded in the source code of the mrack project. With this patch we support the old way and also a new way of specifying the distro variants in the provisioning-config.
Updated the example provisioning-config.yaml file with latest beaker feature examples.
Signed-off-by: Tibor Dudlák tdudlak@redhat.com