we are using pytest for running bandit and python-etcd3gw tests. Since pytest 8 the tests are failing with AttributeError: 'XXX' object has no attribute 'runTest'. Did you mean: 'subTest'?
See:
$ git clone git@github.com:testing-cabal/testtools.git
$ cd testtools
[testtools (master)]$ tox -e py312
...
[testtools (master)]$ .tox/py312/bin/pip install 'pytest>=8'
[testtools (master)]$ .tox/py312/bin/pytest testtools/tests
...
AttributeError: 'TestExpectedException' object has no attribute 'runTest'. Did you mean: 'subTest'?
11 warnings, 218 errors
[testtools (master)]$ .tox/py312/bin/pip install 'pytest<8'
[testtools (master)]$ .tox/py312/bin/pytest testtools/tests
...
38 failed, 1328 passed, 7 skipped, 2 xfailed, 59 warnings
Hello,
we are using pytest for running bandit and python-etcd3gw tests. Since pytest 8 the tests are failing with
AttributeError: 'XXX' object has no attribute 'runTest'. Did you mean: 'subTest'?See:
https://download.copr.fedorainfracloud.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07388287-bandit/builder-live.log.gz
https://download.copr.fedorainfracloud.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07424137-python-etcd3gw/builder-live.log.gz
Reproducer: