Skip to content

tests/test_tornado.py::TestTornado - AttributeError: 'TestTornado' object has no attribute 'runTest' w/ pytest-8.2.0 #460

@mgorny

Description

@mgorny

When trying to run tests, I'm getting the following error:

$ tox -e py311
py311: install_deps> python -I -m pip install '.[doc]' '.[test]'
.pkg-cpython311: install_requires> python -I -m pip install 'setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,!=36.2.0,>=21.0.0' 'setuptools_scm[toml]>=3.4'
.pkg-cpython311: _optional_hooks> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg-cpython311: get_requires_for_build_editable> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg-cpython311: install_requires_for_build_editable> python -I -m pip install setuptools_scm wheel
.pkg-cpython311: build_editable> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py311: install_package> python -I -m pip install --force-reinstall --no-deps /tmp/tenacity/.tox/.tmp/package/1/tenacity-8.3.0-0.editable-py3-none-any.whl
py311: commands[0]> pytest
========================================================= test session starts =========================================================
platform linux -- Python 3.11.9, pytest-8.2.0, pluggy-1.5.0
cachedir: .tox/py311/.pytest_cache
rootdir: /tmp/tenacity
configfile: setup.cfg
plugins: typeguard-4.2.1
collected 109 items / 1 error                                                                                                         

=============================================================== ERRORS ================================================================
_______________________________________________ ERROR collecting tests/test_tornado.py ________________________________________________
.tox/py311/lib/python3.11/site-packages/tornado/testing.py:180: in __init__
    setattr(self, methodName, _TestMethodWrapper(getattr(self, methodName)))
E   AttributeError: 'TestTornado' object has no attribute 'runTest'
======================================================= short test summary info =======================================================
ERROR tests/test_tornado.py::TestTornado - AttributeError: 'TestTornado' object has no attribute 'runTest'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================== 1 error in 0.27s ===========================================================
py311: exit 2 (0.68 seconds) /tmp/tenacity> pytest pid=22558
  py311: FAIL code 2 (23.57=setup[22.89]+cmd[0.68] seconds)
  evaluation failed :( (29.50 seconds)

This is a regression after upgrading to pytest-8.2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions