|
70 | 70 | "--cov-report"
|
71 | 71 | "-r"
|
72 | 72 | "--log-level"
|
| 73 | + "--tb" |
73 | 74 | "--disable-warnings"
|
74 | 75 | "--capture=no"
|
75 | 76 | "-k"
|
76 | 77 | "-m"
|
77 |
| - "--mypy")) |
| 78 | + "--mypy" |
| 79 | + "--exitfirst" |
| 80 | + "--showlocals")) |
78 | 81 |
|
79 | 82 | (defun test-cockpit-python--test-project-command (_ args)
|
80 | 83 | "Make the test project command from ARGS."
|
|
152 | 155 | :choices '("debug" "info" "warn" "error")
|
153 | 156 | :description "log level")
|
154 | 157 |
|
| 158 | +(transient-define-infix test-cockpit-python--choose-traceback () |
| 159 | + :class 'transient-switches |
| 160 | + :key "-t" |
| 161 | + :argument-format "--tb=%s" |
| 162 | + :argument-regexp "--tb=\\(long\\|short\\|line\\|native\\|no\\)" |
| 163 | + :choices '("long" "short" "line" "native" "no") |
| 164 | + :description "show traceback style") |
| 165 | + |
| 166 | + |
155 | 167 | (defun test-cockpit-python--infix ()
|
156 | 168 | "Setup the pytest specific test switches."
|
157 | 169 | [["Switches"
|
158 | 170 | ("-k" test-cockpit-python--restrict-substring)
|
159 | 171 | ("-f" "only lastly failed tests" "--last-failed")
|
| 172 | + ("-x" "exit after first fail" "--exitfirst") |
160 | 173 | ("-b" "build extensions before testing" "build_ext")
|
161 | 174 | ("-m" test-cockpit-python--marker-switch)
|
162 | 175 | ("-M" "test type hints" "--mypy")]
|
|
167 | 180 | ("-c" "print coverage report" "--cov-report=term-missing")
|
168 | 181 | ("-r" "report output of passed tests" "-rFP")
|
169 | 182 | ("-w" "don't output warnings" "--disable-warnings")
|
170 |
| - ("-n" "don't capture output" "--capture=no")]]) |
| 183 | + ("-n" "don't capture output" "--capture=no") |
| 184 | + ("-L" "show locals in tracebacks" "--showlocals") |
| 185 | + (test-cockpit-python--choose-traceback)]]) |
171 | 186 |
|
172 | 187 | (defun test-cockpit-python--find-last-unindented-line ()
|
173 | 188 | "Find the last unindented line from current point in current buffer."
|
|
0 commit comments