Skip to content

0.23.0: pytest if failing in one unit and some other warnings #2243

@kloczek

Description

@kloczek

I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix>
  • run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Here is pytest output:

Details
+ PYTHONDONTWRITEBYTECODE=1
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-httpx-0.23.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-httpx-0.23.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -p no:randomly --deselect tests/client/test_proxies.py::test_async_proxy_close --deselect tests/client/test_proxies.py::test_socks_proxy --deselect tests/client/test_proxies.py::test_sync_proxy_close --deselect tests/models/test_responses.py::test_response_no_charset_with_iso_8859_1_content --deselect 'tests/test_decoders.py::test_text_decoder[data3-iso-8859-1]' --deselect tests/test_main.py::test_auth --deselect tests/test_main.py::test_download --deselect tests/test_main.py::test_errors --deselect tests/test_main.py::test_follow_redirects --deselect tests/test_main.py::test_get --deselect tests/test_main.py::test_help --deselect tests/test_main.py::test_json --deselect tests/test_main.py::test_post --deselect tests/test_main.py::test_redirects --deselect tests/test_main.py::test_verbose
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/httpx-0.23.0, configfile: pytest.ini
plugins: anyio-3.5.0, asyncio-0.18.2, trio-0.7.0
asyncio: mode=auto
collected 692 items / 14 deselected / 678 selected

tests/test_api.py ...........                                                                                                                                        [  1%]
tests/test_asgi.py ....................                                                                                                                              [  4%]
tests/test_auth.py ...                                                                                                                                               [  5%]
tests/test_config.py ...............................                                                                                                                 [  9%]
tests/test_content.py .....................                                                                                                                          [ 12%]
tests/test_decoders.py ..............................                                                                                                                [ 17%]
tests/test_exceptions.py ....                                                                                                                                        [ 17%]
tests/test_exported_members.py .                                                                                                                                     [ 17%]
tests/test_main.py F                                                                                                                                                 [ 17%]
tests/test_multipart.py ...........................                                                                                                                  [ 21%]
tests/test_status_codes.py ......                                                                                                                                    [ 22%]
tests/test_timeouts.py ........                                                                                                                                      [ 24%]
tests/test_utils.py ...................................................                                                                                              [ 31%]
tests/test_wsgi.py ...........                                                                                                                                       [ 33%]
tests/client/test_async_client.py ....................................................                                                                               [ 40%]
tests/client/test_auth.py ...........................................                                                                                                [ 47%]
tests/client/test_client.py ...................................                                                                                                      [ 52%]
tests/client/test_cookies.py .......                                                                                                                                 [ 53%]
tests/client/test_event_hooks.py .........                                                                                                                           [ 54%]
tests/client/test_headers.py ...........                                                                                                                             [ 56%]
tests/client/test_properties.py .......                                                                                                                              [ 57%]
tests/client/test_proxies.py .......................................................................                                                                 [ 67%]
tests/client/test_queryparams.py ...                                                                                                                                 [ 68%]
tests/client/test_redirects.py ...............................                                                                                                       [ 72%]
tests/models/test_cookies.py .......                                                                                                                                 [ 73%]
tests/models/test_headers.py ..................                                                                                                                      [ 76%]
tests/models/test_queryparams.py .............                                                                                                                       [ 78%]
tests/models/test_requests.py .....................                                                                                                                  [ 81%]
tests/models/test_responses.py .......................................................................................                                               [ 94%]
tests/models/test_url.py ......................................                                                                                                      [100%]

================================================================================= FAILURES =================================================================================
_______________________________________________________________________________ test_binary ________________________________________________________________________________

self = <click.testing.CliRunner object at 0x7f66e8252e80>, cli = <function main at 0x7f66e9c4c280>, args = ['http://127.0.0.1:8000/echo_binary', '-c', 'Hello, world!']
input = None, env = None, catch_exceptions = True, color = False, extra = {}, exc_info = None, outstreams = (<_io.BytesIO object at 0x7f66e82459f0>, None)
return_value = None, exception = None, exit_code = 0

    def invoke(
        self,
        cli: "BaseCommand",
        args: t.Optional[t.Union[str, t.Sequence[str]]] = None,
        input: t.Optional[t.Union[str, bytes, t.IO]] = None,
        env: t.Optional[t.Mapping[str, t.Optional[str]]] = None,
        catch_exceptions: bool = True,
        color: bool = False,
        **extra: t.Any,
    ) -> Result:
        """Invokes a command in an isolated environment.  The arguments are
        forwarded directly to the command line script, the `extra` keyword
        arguments are passed to the :meth:`~clickpkg.Command.main` function of
        the command.

        This returns a :class:`Result` object.

        :param cli: the command to invoke
        :param args: the arguments to invoke. It may be given as an iterable
                     or a string. When given as string it will be interpreted
                     as a Unix shell command. More details at
                     :func:`shlex.split`.
        :param input: the input data for `sys.stdin`.
        :param env: the environment overrides.
        :param catch_exceptions: Whether to catch any other exceptions than
                                 ``SystemExit``.
        :param extra: the keyword arguments to pass to :meth:`main`.
        :param color: whether the output should contain color codes. The
                      application can still override this explicitly.

        .. versionchanged:: 8.0
            The result object has the ``return_value`` attribute with
            the value returned from the invoked command.

        .. versionchanged:: 4.0
            Added the ``color`` parameter.

        .. versionchanged:: 3.0
            Added the ``catch_exceptions`` parameter.

        .. versionchanged:: 3.0
            The result object has the ``exc_info`` attribute with the
            traceback if available.
        """
        exc_info = None
        with self.isolation(input=input, env=env, color=color) as outstreams:
            return_value = None
            exception: t.Optional[BaseException] = None
            exit_code = 0

            if isinstance(args, str):
                args = shlex.split(args)

            try:
>               prog_name = extra.pop("prog_name")
E               KeyError: 'prog_name'

/usr/lib/python3.8/site-packages/click/testing.py:403: KeyError

During handling of the above exception, another exception occurred:

server = <tests.conftest.TestServer object at 0x7f66e8fd4fa0>

    def test_binary(server):
        url = str(server.url.copy_with(path="/echo_binary"))
        runner = CliRunner()
        content = "Hello, world!"
>       result = runner.invoke(httpx.main, [url, "-c", content])

tests/test_main.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/click/testing.py:405: in invoke
    prog_name = self.get_default_prog_name(cli)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <click.testing.CliRunner object at 0x7f66e8252e80>, cli = <function main at 0x7f66e9c4c280>

    def get_default_prog_name(self, cli: "BaseCommand") -> str:
        """Given a command object it will return the default program name
        for it.  The default is the `name` attribute or ``"root"`` if not
        set.
        """
>       return cli.name or "root"
E       AttributeError: 'function' object has no attribute 'name'

/usr/lib/python3.8/site-packages/click/testing.py:195: AttributeError
============================================================================= warnings summary =============================================================================
tests/test_timeouts.py:26
  /home/tkloczko/rpmbuild/BUILD/httpx-0.23.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.23.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.23.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_cancellation_during_stream[trio]
  tests/client/test_async_client.py:327: PytestWarning: The test <Function test_cancellation_during_stream[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:367: 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:439: 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
========================================================================= short test summary info ==========================================================================
FAILED tests/test_main.py::test_binary - AttributeError: 'function' object has no attribute 'name'
======================================================= 1 failed, 677 passed, 14 deselected, 1033 warnings in 20.76s =======================================================
---
  • Initially raised as discussion #...

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