From c0fd6eba3898d730b4f7ac60e3d2461474d61241 Mon Sep 17 00:00:00 2001 From: Eric Zhuo Chen Date: Mon, 3 Apr 2023 00:01:25 +0800 Subject: [PATCH 1/3] Add Microsoft Windows support --- python-pytest.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python-pytest.el b/python-pytest.el index 735efb6..968411c 100644 --- a/python-pytest.el +++ b/python-pytest.el @@ -398,7 +398,9 @@ With a prefix ARG, allow editing." 'python-pdbtrack-comint-output-filter-function nil t)) (run-hooks 'python-pytest-setup-hook) - (make-comint-in-buffer "pytest" buffer "sh" nil "-c" command) + (if (eq system-type 'windows-nt) + (make-comint-in-buffer "pytest" buffer "cmd" nil "/c" command) + (make-comint-in-buffer "pytest" buffer "sh" nil "-c" command)) (run-hooks 'python-pytest-started-hook) (setq process (get-buffer-process buffer)) (set-process-sentinel process #'python-pytest--process-sentinel)))) From ba432590eca6a24b5eab05d40d9b5df61eb4c374 Mon Sep 17 00:00:00 2001 From: Eric Zhuo Chen Date: Mon, 3 Apr 2023 09:59:21 +0800 Subject: [PATCH 2/3] Use cmdproxy to better deal with Windows --- python-pytest.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pytest.el b/python-pytest.el index 968411c..1845aae 100644 --- a/python-pytest.el +++ b/python-pytest.el @@ -399,7 +399,7 @@ With a prefix ARG, allow editing." nil t)) (run-hooks 'python-pytest-setup-hook) (if (eq system-type 'windows-nt) - (make-comint-in-buffer "pytest" buffer "cmd" nil "/c" command) + (make-comint-in-buffer "pytest" buffer "cmdproxy" nil "/c" command) (make-comint-in-buffer "pytest" buffer "sh" nil "-c" command)) (run-hooks 'python-pytest-started-hook) (setq process (get-buffer-process buffer)) From 2232c96795b81554f199237a6b1111f242df5346 Mon Sep 17 00:00:00 2001 From: wouter bolsterlee Date: Mon, 6 Nov 2023 16:55:46 +0100 Subject: [PATCH 3/3] Update python-pytest.el --- python-pytest.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python-pytest.el b/python-pytest.el index 1845aae..0cee373 100644 --- a/python-pytest.el +++ b/python-pytest.el @@ -398,9 +398,10 @@ With a prefix ARG, allow editing." 'python-pdbtrack-comint-output-filter-function nil t)) (run-hooks 'python-pytest-setup-hook) - (if (eq system-type 'windows-nt) - (make-comint-in-buffer "pytest" buffer "cmdproxy" nil "/c" command) - (make-comint-in-buffer "pytest" buffer "sh" nil "-c" command)) + (make-comint-in-buffer + "pytest" buffer + (if (eq system-type 'windows-nt) "cmdproxy" "sh") + nil "-c" command) (run-hooks 'python-pytest-started-hook) (setq process (get-buffer-process buffer)) (set-process-sentinel process #'python-pytest--process-sentinel))))