Use C-u to run tests in debug mode
This commit is contained in:
parent
4304c91381
commit
8bd5477de0
1 changed files with 7 additions and 6 deletions
|
|
@ -162,11 +162,10 @@
|
|||
"Set up the Python IDE in the current project"
|
||||
(interactive)
|
||||
(let ((venv-dir (find-venv)))
|
||||
(if venv-dir
|
||||
(when venv-dir
|
||||
(progn
|
||||
(pyvenv-activate venv-dir)
|
||||
(lsp))
|
||||
(pyvenv-deactivate))))
|
||||
(lsp)))))
|
||||
|
||||
(defun symbols-at-point ()
|
||||
(let* ((lsp--document-symbols-request-async t)
|
||||
|
|
@ -191,11 +190,13 @@
|
|||
(filename (f-no-ext (f-filename (buffer-file-name)))))
|
||||
(string-join (append path (list filename) (python-test-at-point)) ".")))
|
||||
|
||||
(defun python-run-test-at-point ()
|
||||
(interactive)
|
||||
(defun python-run-test-at-point (debug)
|
||||
(interactive "P")
|
||||
(let ((python (executable-find "python"))
|
||||
(test-name (python-test-name-at-point)))
|
||||
(compile (concat python " -m unittest " test-name))))
|
||||
(if debug
|
||||
(pdb (concat python " -m pdb -m unittest " test-name))
|
||||
(compile (concat python " -m unittest " test-name)))))
|
||||
|
||||
(use-package python
|
||||
:bind (:map python-mode-map
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue