tornadoweb / tornado

Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.
http://www.tornadoweb.org/
Apache License 2.0
21.76k stars 5.51k forks source link

testing: Replace _TestMethodWrapper with _callTestMethod #3382

Closed bdarnell closed 5 months ago

bdarnell commented 5 months ago

Overriding _callTestMethod (which was introduced in python 3.8) is a less hacky way to detect tests that fail to use @gen_test where needed. It's not documented, but since Python 3.11 has introduced a similar check to the standard library we'll be able to remove it in the near future.

The major impetus for this change is an incompatibility with Pytest 8.2, which has made a change that tries to instantiate test classes at discovery time without an existing method name.

Fixes #3375 Closes #3374

arossert commented 5 months ago

@bdarnell Any plans to create a new release with this fix?

bdarnell commented 5 months ago

This was included in 6.4.1 that went out yesterday.