Add decorated function to pytest runnables (#22325)
Fixes: #22324 Closes #ISSUE Release Notes: - Fixed pytest decoracted function discovery
This commit is contained in:
parent
e82af55d64
commit
7184b15f48
1 changed files with 14 additions and 0 deletions
|
@ -41,6 +41,20 @@
|
||||||
(#set! tag python-pytest-method)
|
(#set! tag python-pytest-method)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
; decorated pytest functions
|
||||||
|
(
|
||||||
|
(module
|
||||||
|
(decorated_definition
|
||||||
|
(decorator)+ @decorator
|
||||||
|
definition: (function_definition
|
||||||
|
name: (identifier) @run @_pytest_decorated_method_name
|
||||||
|
(#match? @_pytest_decorated_method_name "^test_")
|
||||||
|
)
|
||||||
|
) @python-pytest-method
|
||||||
|
)
|
||||||
|
(#set! tag python-pytest-method)
|
||||||
|
)
|
||||||
|
|
||||||
; pytest classes
|
; pytest classes
|
||||||
(
|
(
|
||||||
(module
|
(module
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue