Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

python: Fix decorated test detection (#22327)

Piotr Osiewiczfac5118f104f
diff --git a/crates/languages/src/python/runnables.scm b/crates/languages/src/python/runnables.scm
index c61e9a23e5d..8cdb0d77eb2 100644
--- a/crates/languages/src/python/runnables.scm
+++ b/crates/languages/src/python/runnables.scm
@@ -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)
)
)