Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions python-pytest.el
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ When non-nil only ‘test_foo()’ will match, and nothing else."
(defvar-local python-pytest--current-command nil
"Current command; used in python-pytest-mode buffers.")

(defvar-local python-pytest--verbosity-level 0
"Verbosity level.")

(fmakunbound 'python-pytest-popup)
(makunbound 'python-pytest-popup)

Expand All @@ -135,7 +132,7 @@ When non-nil only ‘test_foo()’ will match, and nothing else."
(?q "quiet" "--quiet")
(?s "do not capture output" "--capture=no")
(?t "do not cut tracebacks" "--full-trace")
(?v "verbose" python-pytest--cycle-verbosity)
(?v "verbose" "--verbose")
(?x "exit after first failure" "--exitfirst"))
:options
'((?k "only names matching expression" "-k")
Expand Down Expand Up @@ -564,18 +561,6 @@ Example: ‘MyABCThingy.__repr__’ becomes ‘test_my_abc_thingy_repr’."
(t nil)))


(defun python-pytest--cycle-verbosity ()
"Cycle the verbosity level from 0 (no -v flag) to 2 (-vv flag)."
(cond
((memq python-pytest--verbosity '(0 1))
(setq python-pytest--verbosity (+ 1 python-pytest--verbosity)))
(t (setq python-pytest--verbosity 0)))
(cond
((= python-pytest--verbosity 0) "")
((= python-pytest--verbosity 1) "-v")
((= python-pytest--verbosity 2) "-vv")))


;; third party integration

(with-eval-after-load 'direnv
Expand Down