1. Dan Lipsitt
  2. nosemacs


Augie Fackler  committed 9302529

Add support for running nose with the --failed flag.

  • Participants
  • Parent commits 858ef60
  • Branches default

Comments (0)

Files changed (1)

File nose.el

View file
 (defvar nose-global-name "nosetests")
 (defvar nose-use-verbose t)
-(defun run-nose (&optional tests debug)
+(defun run-nose (&optional tests debug failed)
   "run nosetests"
   (let* ((nose (nose-find-test-runner))
          (where (nose-find-project-root))
-         (args (if debug "--pdb" ""))
+         (args (concat (if debug "--pdb" "")
+                       " "
+                       (if failed "--failed" "")))
          (tnames (if tests tests "")))
     (funcall (if debug
               (nose-find-test-runner) args where where tnames)))
-(defun nosetests-all (&optional debug)
+(defun nosetests-all (&optional debug failed)
   "run all tests"
-  (run-nose nil debug))
+  (run-nose nil debug failed))
+(defun nosetests-failed (&optional debug)
+  (interactive)
+  (nosetests-all debug t))
 (defun nosetests-pdb-all ()