Skip to content

Commit 9f850e2

Browse files
committed
use better prompt when selecting directories
1 parent 2040c1b commit 9f850e2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python-pytest.el

+4-3
Original file line numberDiff line numberDiff line change
@@ -595,10 +595,11 @@ Example: ‘MyABCThingy.__repr__’ becomes ‘test_my_abc_thingy_repr’."
595595
(-map 'file-name-directory)
596596
(-uniq)
597597
(-sort 'string<)))
598-
(candidates (if (eq type 'file) test-files test-directories)))
598+
(candidates (if (eq type 'file) test-files test-directories))
599+
(prompt (if (eq type 'file) "Choose test files: " "Choose test directories: ")))
599600
(unless candidates
600-
(user-error "No test files found"))
601-
(completing-read-multiple "Choose test files: " candidates nil t)))
601+
(user-error "No test files or directories found"))
602+
(completing-read-multiple prompt candidates nil t)))
602603

603604
(defun python-pytest--maybe-save-buffers ()
604605
"Maybe save modified buffers."

0 commit comments

Comments
 (0)