mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 13:44:09 +03:00
python: Fix decorated test detection (#22327)
Follow-up to #22325, where I missed a couple points in the review that were actually quite relevant. Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
7184b15f48
commit
fac5118f10
@ -36,7 +36,7 @@
|
||||
(function_definition
|
||||
name: (identifier) @run @_pytest_method_name
|
||||
(#match? @_pytest_method_name "^test_")
|
||||
) @python-pytest-method
|
||||
) @_python-pytest-method
|
||||
)
|
||||
(#set! tag python-pytest-method)
|
||||
)
|
||||
@ -45,12 +45,12 @@
|
||||
(
|
||||
(module
|
||||
(decorated_definition
|
||||
(decorator)+ @decorator
|
||||
(decorator)+ @_decorator
|
||||
definition: (function_definition
|
||||
name: (identifier) @run @_pytest_decorated_method_name
|
||||
(#match? @_pytest_decorated_method_name "^test_")
|
||||
name: (identifier) @run @_pytest_method_name
|
||||
(#match? @_pytest_method_name "^test_")
|
||||
)
|
||||
) @python-pytest-method
|
||||
) @_python-pytest-method
|
||||
)
|
||||
(#set! tag python-pytest-method)
|
||||
)
|
||||
@ -76,7 +76,7 @@
|
||||
(function_definition
|
||||
name: (identifier) @run @_pytest_method_name
|
||||
(#match? @_pytest_method_name "^test")
|
||||
) @python-pytest-method
|
||||
) @_python-pytest-method
|
||||
(#set! tag python-pytest-method)
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user