Skip to content

Commit

Permalink
python: Fix decorated test detection (#22327)
Browse files Browse the repository at this point in the history
Follow-up to #22325, where I missed a couple points in the review that
were actually quite relevant.

Closes #ISSUE

Release Notes:

- N/A
  • Loading branch information
osiewicz authored Dec 21, 2024
1 parent 7184b15 commit fac5118
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/languages/src/python/runnables.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand All @@ -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)
)
Expand All @@ -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)
)
)
Expand Down

0 comments on commit fac5118

Please sign in to comment.