From 6d284ac1c7370c63ed26358dcfa93fe79175842b Mon Sep 17 00:00:00 2001 From: Donggu Kang Date: Sat, 8 Mar 2025 11:17:23 +0900 Subject: [PATCH] Support setup_method, teardown_method for new pytest --- qcore/testing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qcore/testing.py b/qcore/testing.py index 1880570..c25d48c 100644 --- a/qcore/testing.py +++ b/qcore/testing.py @@ -106,6 +106,7 @@ def wrapper(*args, **kwargs): def decorate_class(class_): class_.setup = class_.teardown = lambda self: None + class_.setup_method = class_.teardown_method = lambda self: None return decorate_all_test_methods(decorate_func)(class_) if inspect.isfunction(func_or_class):