How can individual unit tests be temporarily disabled when using the unittest
module in Python?
The latest version (2.7 - unreleased) supports test skipping/disabling like so. You could just get this module and use it on your existing Python install. It will probably work.
Before this, I used to rename the tests I wanted skipped to xtest_testname
from test_testname
.
Here's a quick elisp script to do this. My elisp is a little rusty so I apologise in advance for any problems it has. Untested.
(defun disable_enable_test ()
(interactive "")
(save-excursion
(beginning-of-line)
(search-forward "def")
(forward-char)
(if (looking-at "disable_")
(zap-to-char 1 ?_)
(insert "disable_"))))