wbolster / emacs-python-pytest

run pytest inside emacs
BSD 3-Clause "New" or "Revised" License
149 stars 26 forks source link

Make python-pytest work on Microsoft Windows #69

Closed torhtoot closed 12 months ago

torhtoot commented 1 year ago

Currently comint is called with sh as the shell command, which is not available on Windows. This could be changed to cmd if Windows is detected as the current OS:

(let ((shell-command "sh")
     (shell-command-switch "-c"))
  (when (eq system-type 'windows-nt)
    (setq shell-command "cmd")
    (setq shell-command-switch "/c"))
  (make-comint-in-buffer "pytest" buffer shell-command nil shell-command-switch command))
MagielBruntink commented 12 months ago

It seems https://github.com/wbolster/emacs-python-pytest/commit/7e8acc0232355db35dc66a15bf50c14a80ba3e72 fixed this.