Files
zed/crates/languages/src/python/runnables.scm
T
Piotr Osiewicz 9dfe4a30bb languages: Do not expose unnecessary captures from tasks (#19625)
This tackles an issue with us exposing unnecessary env variables in
environment which are not actually needed for tasks themselves (and may
have little utility), yet come into the way of ssh remoting.

/cc @ConradIrwin 

Release Notes:

- N/A
2024-10-23 18:54:08 +02:00

32 lines
987 B
Scheme

; subclasses of unittest.TestCase or TestCase
(
(class_definition
name: (identifier) @run @_unittest_class_name
superclasses: (argument_list
[(identifier) @_superclass
(attribute (identifier) @_superclass)]
)
(#eq? @_superclass "TestCase")
) @_python-unittest-class
(#set! tag python-unittest-class)
)
; test methods whose names start with `test` in a TestCase
(
(class_definition
name: (identifier) @_unittest_class_name
superclasses: (argument_list
[(identifier) @_superclass
(attribute (identifier) @_superclass)]
)
(#eq? @_superclass "TestCase")
body: (block
(function_definition
name: (identifier) @run @_unittest_method_name
(#match? @_unittest_method_name "^test.*")
) @_python-unittest-method
(#set! tag python-unittest-method)
)
)
)