]> git.ipfire.org Git - thirdparty/tornado.git/commit
testing: Replace _TestMethodWrapper with _callTestMethod 3382/head
authorBen Darnell <ben@bendarnell.com>
Mon, 3 Jun 2024 19:49:59 +0000 (15:49 -0400)
committerBen Darnell <ben@bendarnell.com>
Mon, 3 Jun 2024 19:49:59 +0000 (15:49 -0400)
commit180332ad5e9473ad951a6e3924ac0624ef6fa631
tree628e9b788e114c2f949629067d5af9e6fa1eb092
parentf399f40fde0ae1b130646db783a6f79cc59231b2
testing: Replace _TestMethodWrapper with _callTestMethod

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
tornado/test/testing_test.py
tornado/testing.py