Skip to content

0.22.0: pytest warnings #2170

@kloczek

Description

@kloczek

Looks like latest poytest shows a lot of warnings

============================================================================= warnings summary =============================================================================
tests/test_timeouts.py:26
  /home/tkloczko/rpmbuild/BUILD/httpx-0.22.0/tests/test_timeouts.py:26: PytestUnknownMarkWarning: Unknown pytest.mark.network - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.network

tests/client/test_proxies.py:136
  /home/tkloczko/rpmbuild/BUILD/httpx-0.22.0/tests/client/test_proxies.py:136: PytestUnknownMarkWarning: Unknown pytest.mark.network - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.network

tests/client/test_proxies.py:145
  /home/tkloczko/rpmbuild/BUILD/httpx-0.22.0/tests/client/test_proxies.py:145: PytestUnknownMarkWarning: Unknown pytest.mark.network - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.network

tests/test_asgi.py::test_asgi_transport[trio]
  tests/test_asgi.py:73: PytestWarning: The test <Function test_asgi_transport[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_asgi.py::test_asgi_transport_no_body[trio]
  tests/test_asgi.py:83: PytestWarning: The test <Function test_asgi_transport_no_body[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_asgi.py::test_asgi[trio]
  tests/test_asgi.py:93: PytestWarning: The test <Function test_asgi[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_asgi.py::test_asgi_urlencoded_path[trio]
  tests/test_asgi.py:102: PytestWarning: The test <Function test_asgi_urlencoded_path[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_asgi.py::test_asgi_raw_path[trio]
  tests/test_asgi.py:112: PytestWarning: The test <Function test_asgi_raw_path[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_asgi.py::test_asgi_upload[trio]
  tests/test_asgi.py:122: PytestWarning: The test <Function test_asgi_upload[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_asgi.py::test_asgi_headers[trio]
  tests/test_asgi.py:131: PytestWarning: The test <Function test_asgi_headers[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_asgi.py::test_asgi_exc[trio]
  tests/test_asgi.py:148: PytestWarning: The test <Function test_asgi_exc[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_asgi.py::test_asgi_exc_after_response[trio]
  tests/test_asgi.py:155: PytestWarning: The test <Function test_asgi_exc_after_response[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_asgi.py::test_asgi_disconnect_after_response_complete[trio]
  tests/test_asgi.py:162: PytestWarning: The test <Function test_asgi_disconnect_after_response_complete[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_timeouts.py::test_read_timeout[trio]
  tests/test_timeouts.py:6: PytestWarning: The test <Function test_read_timeout[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_timeouts.py::test_write_timeout[trio]
  tests/test_timeouts.py:15: PytestWarning: The test <Function test_write_timeout[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_timeouts.py::test_connect_timeout[trio]
  tests/test_timeouts.py:25: PytestWarning: The test <Function test_connect_timeout[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_timeouts.py::test_pool_timeout[trio]
  tests/test_timeouts.py:36: PytestWarning: The test <Function test_pool_timeout[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/test_utils.py: 1 warning
tests/client/test_event_hooks.py: 3 warnings
tests/client/test_redirects.py: 112 warnings
tests/models/test_url.py: 48 warnings
  /usr/lib/python3.8/site-packages/rfc3986/_mixin.py:116: DeprecationWarning: Please use rfc3986.validators.Validator instead. This method will be eventually removed.
    warnings.warn(

tests/test_utils.py: 1 warning
tests/client/test_event_hooks.py: 3 warnings
tests/client/test_redirects.py: 112 warnings
tests/models/test_url.py: 48 warnings
  /usr/lib/python3.8/site-packages/rfc3986/_mixin.py:172: DeprecationWarning: Please use rfc3986.validators.Validator instead. This method will be eventually removed.
    warnings.warn(

tests/test_utils.py: 1 warning
tests/client/test_event_hooks.py: 3 warnings
tests/client/test_redirects.py: 112 warnings
tests/models/test_url.py: 48 warnings
  /usr/lib/python3.8/site-packages/rfc3986/_mixin.py:144: DeprecationWarning: Please use rfc3986.validators.Validator instead. This method will be eventually removed.
    warnings.warn(

tests/test_utils.py: 1 warning
tests/client/test_event_hooks.py: 3 warnings
tests/client/test_redirects.py: 112 warnings
tests/models/test_url.py: 48 warnings
  /usr/lib/python3.8/site-packages/rfc3986/_mixin.py:191: DeprecationWarning: Please use rfc3986.validators.Validator instead. This method will be eventually removed.
    warnings.warn(

tests/test_utils.py: 1 warning
tests/client/test_event_hooks.py: 3 warnings
tests/client/test_redirects.py: 112 warnings
tests/models/test_url.py: 48 warnings
  /usr/lib/python3.8/site-packages/rfc3986/_mixin.py:210: DeprecationWarning: Please use rfc3986.validators.Validator instead. This method will be eventually removed.
    warnings.warn(

tests/test_utils.py: 1 warning
tests/client/test_event_hooks.py: 3 warnings
tests/client/test_redirects.py: 112 warnings
tests/models/test_url.py: 48 warnings
  /usr/lib/python3.8/site-packages/rfc3986/_mixin.py:229: DeprecationWarning: Please use rfc3986.validators.Validator instead. This method will be eventually removed.
    warnings.warn(

tests/client/test_async_client.py::test_get[trio]
  tests/client/test_async_client.py:9: PytestWarning: The test <Function test_get[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_get_invalid_url[trio-scheme-not-http(s)]
  tests/client/test_async_client.py:22: PytestWarning: The test <Function test_get_invalid_url[trio-scheme-not-http(s)]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.parametrize(

tests/client/test_async_client.py::test_get_invalid_url[trio-no-scheme]
  tests/client/test_async_client.py:22: PytestWarning: The test <Function test_get_invalid_url[trio-no-scheme]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.parametrize(

tests/client/test_async_client.py::test_get_invalid_url[trio-no-host]
  tests/client/test_async_client.py:22: PytestWarning: The test <Function test_get_invalid_url[trio-no-host]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.parametrize(

tests/client/test_async_client.py::test_build_request[trio]
  tests/client/test_async_client.py:37: PytestWarning: The test <Function test_build_request[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_post[trio]
  tests/client/test_async_client.py:52: PytestWarning: The test <Function test_post[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_post_json[trio]
  tests/client/test_async_client.py:60: PytestWarning: The test <Function test_post_json[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_stream_response[trio]
  tests/client/test_async_client.py:68: PytestWarning: The test <Function test_stream_response[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_access_content_stream_response[trio]
  tests/client/test_async_client.py:79: PytestWarning: The test <Function test_access_content_stream_response[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_stream_request[trio]
  tests/client/test_async_client.py:90: PytestWarning: The test <Function test_stream_request[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_cannot_stream_sync_request[trio]
  tests/client/test_async_client.py:101: PytestWarning: The test <Function test_cannot_stream_sync_request[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_raise_for_status[trio]
  tests/client/test_async_client.py:112: PytestWarning: The test <Function test_raise_for_status[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_options[trio]
  tests/client/test_async_client.py:128: PytestWarning: The test <Function test_options[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_head[trio]
  tests/client/test_async_client.py:136: PytestWarning: The test <Function test_head[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_put[trio]
  tests/client/test_async_client.py:144: PytestWarning: The test <Function test_put[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_patch[trio]
  tests/client/test_async_client.py:151: PytestWarning: The test <Function test_patch[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_delete[trio]
  tests/client/test_async_client.py:158: PytestWarning: The test <Function test_delete[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_100_continue[trio]
  tests/client/test_async_client.py:166: PytestWarning: The test <Function test_100_continue[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_context_managed_transport[trio]
  tests/client/test_async_client.py:180: PytestWarning: The test <Function test_context_managed_transport[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_context_managed_transport_and_mount[trio]
  tests/client/test_async_client.py:212: PytestWarning: The test <Function test_context_managed_transport_and_mount[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_client_closed_state_using_implicit_open[trio]
  tests/client/test_async_client.py:257: PytestWarning: The test <Function test_client_closed_state_using_implicit_open[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_client_closed_state_using_with_block[trio]
  tests/client/test_async_client.py:278: PytestWarning: The test <Function test_client_closed_state_using_with_block[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_mounted_transport[trio]
  tests/client/test_async_client.py:299: PytestWarning: The test <Function test_mounted_transport[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_async_mock_transport[trio]
  tests/client/test_async_client.py:314: PytestWarning: The test <Function test_async_mock_transport[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_async_client.py::test_server_extensions[trio]
  tests/client/test_async_client.py:327: PytestWarning: The test <Function test_server_extensions[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_event_hooks.py::test_async_event_hooks[trio]
  tests/client/test_event_hooks.py:66: PytestWarning: The test <Function test_async_event_hooks[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_event_hooks.py::test_async_event_hooks_raising_exception[trio]
  tests/client/test_event_hooks.py:102: PytestWarning: The test <Function test_async_event_hooks_raising_exception[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_event_hooks.py::test_async_event_hooks_with_redirect[trio]
  tests/client/test_event_hooks.py:174: PytestWarning: The test <Function test_async_event_hooks_with_redirect[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_redirects.py::test_async_next_request[trio]
  tests/client/test_redirects.py:152: PytestWarning: The test <Function test_async_next_request[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_redirects.py::test_async_too_many_redirects[trio]
  tests/client/test_redirects.py:241: PytestWarning: The test <Function test_async_too_many_redirects[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

tests/client/test_redirects.py::test_async_invalid_redirect[trio]
  tests/client/test_redirects.py:421: PytestWarning: The test <Function test_async_invalid_redirect[trio]> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    @pytest.mark.usefixtures("async_environment")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================ 661 passed, 15 deselected, 1032 warnings in 31.27s ============================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions