From 6021ed14b40b37e3ed4e082efbb67eb76dc91262 Mon Sep 17 00:00:00 2001 From: Christian Vanderwall Date: Wed, 8 Dec 2021 16:31:48 -0800 Subject: [PATCH] Add transient arg for pytest-xdist parallelization --- python-pytest.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python-pytest.el b/python-pytest.el index 96632b0..b13de57 100644 --- a/python-pytest.el +++ b/python-pytest.el @@ -126,6 +126,8 @@ When non-nil only ‘test_foo()’ will match, and nothing else." ("-q" "quiet" "--quiet") ("-s" "no output capture" "--capture=no") (python-pytest:-v)]] + ["Parallelization" + (python-pytest:-n)] ["Selection, filtering, ordering" [(python-pytest:-k) (python-pytest:-m) @@ -476,6 +478,13 @@ When present ON-REPLACEMENT is substituted, else OFF-REPLACEMENT is appended." :argument "--tb=" :choices '("long" "short" "line" "native" "no")) +(transient-define-argument python-pytest:-n () + :description "number of processes" + :class 'transient-option + :key "-n" + :argument "-n=" + :choices '("auto" "1" "2" "3" "4" "5" "6" "7" "8")) + ;; python helpers