File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ https://github.com/pyenv/pyenv-which-ext."
8888(lsp-defun dap-python--parse-lsp-symbol
8989 ((&DocumentSymbol
9090 :name :kind
91- :selection- range (&Range :start (&Position :line start-line
91+ :range (&Range :start (&Position :line start-line
9292 :character start-character)
9393 :end (&Position :line end-line
9494 :character end-character))))
@@ -113,7 +113,8 @@ https://github.com/pyenv/pyenv-which-ext."
113113
114114(defun dap-python--test-p (lsp-symbol )
115115 (let ((name (dap-python--symbol-name lsp-symbol)))
116- (and (string= (dap-python--symbol-type lsp-symbol) " Function" )
116+ (and (or (string= (dap-python--symbol-type lsp-symbol) " Function" )
117+ (string= (dap-python--symbol-type lsp-symbol) " Method" ))
117118 (s-starts-with? " test_" name))))
118119
119120(defun dap-python--test-class-p (test-symbol lsp-symbol )
@@ -142,6 +143,7 @@ https://github.com/pyenv/pyenv-which-ext."
142143
143144(defun dap-python--test-at-point ()
144145 (->> (lsp--get-document-symbols)
146+ (lsp--symbols->document-symbols-hierarchy)
145147 (mapcar #'dap-python--parse-lsp-symbol )
146148 (dap-python--symbols-before-point (dap-python--cursor-position))
147149 dap-python--nearest-test))
You can’t perform that action at this time.
0 commit comments