Skip to content

Commit

Permalink
Add support for pytest --showlocals
Browse files Browse the repository at this point in the history
Fixes #29
  • Loading branch information
johannes-mueller committed Jun 1, 2024
1 parent 26fe593 commit f701b14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions test-cockpit-python.el
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"-k"
"-m"
"--mypy"
"--exitfirst"))
"--exitfirst"
"--showlocals"))

(defun test-cockpit-python--test-project-command (_ args)
"Make the test project command from ARGS."
Expand Down Expand Up @@ -155,7 +156,8 @@
("-c" "print coverage report" "--cov-report=term-missing")
("-r" "report output of passed tests" "-rFP")
("-w" "don't output warnings" "--disable-warnings")
("-n" "don't capture output" "--capture=no")]])
("-n" "don't capture output" "--capture=no")
("-L" "show locals in tracebacks" "--showlocals")]])

(defun test-cockpit-python--find-last-unindented-line ()
"Find the last unindented line from current point in current buffer."
Expand Down
3 changes: 2 additions & 1 deletion test/test-python.el-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -403,4 +403,5 @@ async def test_first_outer():
(should (equal (aref (aref infix 1) 4) '("-c" "print coverage report" "--cov-report=term-missing")))
(should (equal (aref (aref infix 1) 5) '("-r" "report output of passed tests" "-rFP")))
(should (equal (aref (aref infix 1) 6) '("-w" "don't output warnings" "--disable-warnings")))
(should (equal (aref (aref infix 1) 7) '("-n" "don't capture output" "--capture=no"))))))
(should (equal (aref (aref infix 1) 7) '("-n" "don't capture output" "--capture=no")))
(should (equal (aref (aref infix 1) 8) '("-L" "show locals in tracebacks" "--showlocals"))))))

0 comments on commit f701b14

Please sign in to comment.