File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -329,6 +329,13 @@ With a prefix ARG, allow editing."
329
329
" Major mode for pytest sessions (derived from comint-mode)."
330
330
(compilation-setup ))
331
331
332
+ (defvar python-pytest-finished-mode-map
333
+ (let ((map (make-sparse-keymap )))
334
+ (set-keymap-parent map compilation-minor-mode-map)
335
+ (define-key map " g" #'python-pytest-repeat )
336
+ map)
337
+ " Keymap for `python-pytest-mode' major mode." )
338
+
332
339
(cl-defun python-pytest--run (&key args file func edit )
333
340
" Run pytest for the given arguments."
334
341
(setq args (python-pytest--transform-arguments args))
@@ -413,6 +420,9 @@ With a prefix ARG, allow editing."
413
420
(defun python-pytest--process-sentinel (proc _state )
414
421
" Process sentinel helper to run hooks after PROC finishes."
415
422
(with-current-buffer (process-buffer proc)
423
+ (compilation-mode )
424
+ (read-only-mode -1 ) ; required for `python-pytest-repeat'
425
+ (use-local-map python-pytest-finished-mode-map)
416
426
(run-hooks 'python-pytest-finished-hook )))
417
427
418
428
(defun python-pytest--transform-arguments (args )
You can’t perform that action at this time.
0 commit comments