mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 19:10:24 +00: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
1 changed files with 6 additions and 6 deletions
|
@ -36,7 +36,7 @@
|
||||||
(function_definition
|
(function_definition
|
||||||
name: (identifier) @run @_pytest_method_name
|
name: (identifier) @run @_pytest_method_name
|
||||||
(#match? @_pytest_method_name "^test_")
|
(#match? @_pytest_method_name "^test_")
|
||||||
) @python-pytest-method
|
) @_python-pytest-method
|
||||||
)
|
)
|
||||||
(#set! tag python-pytest-method)
|
(#set! tag python-pytest-method)
|
||||||
)
|
)
|
||||||
|
@ -45,12 +45,12 @@
|
||||||
(
|
(
|
||||||
(module
|
(module
|
||||||
(decorated_definition
|
(decorated_definition
|
||||||
(decorator)+ @decorator
|
(decorator)+ @_decorator
|
||||||
definition: (function_definition
|
definition: (function_definition
|
||||||
name: (identifier) @run @_pytest_decorated_method_name
|
name: (identifier) @run @_pytest_method_name
|
||||||
(#match? @_pytest_decorated_method_name "^test_")
|
(#match? @_pytest_method_name "^test_")
|
||||||
)
|
)
|
||||||
) @python-pytest-method
|
) @_python-pytest-method
|
||||||
)
|
)
|
||||||
(#set! tag python-pytest-method)
|
(#set! tag python-pytest-method)
|
||||||
)
|
)
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
(function_definition
|
(function_definition
|
||||||
name: (identifier) @run @_pytest_method_name
|
name: (identifier) @run @_pytest_method_name
|
||||||
(#match? @_pytest_method_name "^test")
|
(#match? @_pytest_method_name "^test")
|
||||||
) @python-pytest-method
|
) @_python-pytest-method
|
||||||
(#set! tag python-pytest-method)
|
(#set! tag python-pytest-method)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue