File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -248,10 +248,20 @@ overriden in individual `dap-python' launch configurations."
248248 (plist-put conf :program program)
249249 conf))
250250
251+ (defun dap-python--normalize-args (args )
252+ " Convert ARGS to a `list' of arguments.
253+ ARGS may be a string, a vector or a list."
254+ (cl-typecase args
255+ (string (split-string-and-unquote args))
256+ (vector (cl-coerce args 'list ))
257+ (t args)))
258+
251259(defun dap-python--populate-test-at-point (conf )
252260 " Populate CONF with the required arguments."
253261 (if-let ((test (dap-python--test-at-point)))
254- (plist-put conf :target-module (concat (buffer-file-name ) test))
262+ (let ((args (dap-python--normalize-args (plist-get conf :args ))))
263+ (cl-remf conf :args )
264+ (plist-put conf :args (cons (concat (buffer-file-name ) test) args)))
255265 (user-error " `dap-python' : no test at point" ))
256266 (plist-put conf :cwd (lsp-workspace-root))
257267
You can’t perform that action at this time.
0 commit comments