Skip to content

[self-tests] tests fail against pytest-asyncio 1.0.0+ #93

@stanislavlevin

Description

@stanislavlevin

pytest-asyncio 1.0.0 removed

The deprecated event_loop fixture. (#1106)

https://pytest-asyncio.readthedocs.io/en/latest/reference/changelog.html#removed

This leads to tests errors like:

______________ ERROR collecting telnetlib3/tests/test_charset.py _______________
ImportError while importing test module '/usr/src/RPM/BUILD/python3-module-telnetlib3-2.0.4/telnetlib3/tests/test_charset.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
telnetlib3/tests/test_charset.py:8: in <module>
    from telnetlib3.tests.accessories import unused_tcp_port, bind_host
telnetlib3/tests/accessories.py:7: in <module>
    from pytest_asyncio.plugin import unused_tcp_port, event_loop
E   ImportError: cannot import name 'event_loop' from 'pytest_asyncio.plugin' (/usr/lib/python3/site-packages/pytest_asyncio/plugin.py)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions