Add defvar python-save-before-test
If true, buffer is automatically saved when calling python-test-* functions
This commit is contained in:
parent
572820e618
commit
3f01fd5fed
|
@ -20,6 +20,9 @@
|
|||
(defvar python-test-runner 'nose
|
||||
"Test runner to use. Possible values are `nose' or `pytest'.")
|
||||
|
||||
(defvar python-save-before-test t
|
||||
"If non nil, current buffer will be save before call a test function")
|
||||
|
||||
(defvar python-fill-column 79
|
||||
"Fill column value for python buffers")
|
||||
|
||||
|
|
|
@ -165,6 +165,8 @@ when this mode is enabled since the minibuffer is cleared all the time."
|
|||
ARG is the universal-argument which chooses between the main and
|
||||
the secondary test runner. FUNCALIST is an alist of the function
|
||||
to be called for each testrunner. "
|
||||
(when python-save-before-test
|
||||
(save-buffer))
|
||||
(let* ((test-runner (if arg
|
||||
(spacemacs//python-get-secondary-testrunner)
|
||||
(spacemacs//python-get-main-testrunner)))
|
||||
|
|
Loading…
Reference in a new issue