Skip to content

Commit 03beb7c

Browse files
committed
Correctly handle -m and -k flags
Fixes #36.
1 parent a2f88b1 commit 03beb7c

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

python-pytest.el

+16-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ When non-nil only ‘test_foo()’ will match, and nothing else."
128128
("-s" "no output capture" "--capture=no")
129129
(python-pytest:-v)]]
130130
["Selection, filtering, ordering"
131-
[("-k" "only names matching expression" "-k=")
132-
("-m" "only marks matching expression" "-m=")
131+
[(python-pytest:-k)
132+
(python-pytest:-m)
133133
" "] ;; visual alignment
134134
[("--dm" "run doctests" "--doctest-modules")
135135
("--nf" "new first" "--new-first")
@@ -441,6 +441,20 @@ When present ON-REPLACEMENT is substituted, else OFF-REPLACEMENT is appended."
441441
(format "%s %s" option it)))
442442
args))
443443

444+
(transient-define-argument python-pytest:-k ()
445+
:description "only names matching expression"
446+
:class 'transient-option
447+
:argument "-k"
448+
:allow-empty nil
449+
:key "-k")
450+
451+
(transient-define-argument python-pytest:-m ()
452+
:description "only marks matching expression"
453+
:class 'transient-option
454+
:argument "-m"
455+
:allow-empty nil
456+
:key "-m")
457+
444458
(transient-define-argument python-pytest:-v ()
445459
:description "verbosity"
446460
:class 'transient-switches

0 commit comments

Comments
 (0)