Skip to content

Commit e491a98

Browse files
cvdubwbolster
andcommitted
Add dispatch options for pytest-xdist
Closes #54. Co-authored-by: wouter bolsterlee <[email protected]>
1 parent e77469f commit e491a98

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

python-pytest.el

+10
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ When non-nil only ‘test_foo()’ will match, and nothing else."
143143
("--rx" "run xfail tests" "--runxfail")
144144
(python-pytest:--tb)
145145
("--tr" "debug on each test" "--trace")]]
146+
["Options for pytest-xdist"
147+
[(python-pytest:-n)]
148+
[("-f" "loop on failure" "--looponfail")]]
146149
["Run tests"
147150
[("t" "all" python-pytest)]
148151
[("r" "repeat" python-pytest-repeat)
@@ -476,6 +479,13 @@ When present ON-REPLACEMENT is substituted, else OFF-REPLACEMENT is appended."
476479
:argument "--tb="
477480
:choices '("long" "short" "line" "native" "no"))
478481

482+
(transient-define-argument python-pytest:-n ()
483+
:description "number of processes"
484+
:class 'transient-option
485+
:key "-n"
486+
:argument "--numprocesses="
487+
:choices '("auto" "1" "2" "4" "8" "16"))
488+
479489

480490
;; python helpers
481491

0 commit comments

Comments
 (0)