summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-04-19 13:36:37 -0400
committerKyle Meyer <kyle@kyleam.com>2014-04-19 13:36:37 -0400
commit2fa7bb0f29613f896f8c0234fbb5b60bbddedd9b (patch)
tree99f1cddac5e421c4f0b950bcc5c4700294091629
parentb765746c9c8c2c60e1018f48c92b612250776a9e (diff)
downloademacs.d-2fa7bb0f29613f896f8c0234fbb5b60bbddedd9b.tar.gz
Rename km/create-python-test-file
-rw-r--r--lisp/init-python.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/init-python.el b/lisp/init-python.el
index 5ab562e..5c39e2f 100644
--- a/lisp/init-python.el
+++ b/lisp/init-python.el
@@ -12,9 +12,10 @@
python-shell-completion-string-code
"';'.join(get_ipython().Completer.all_completions('''%s'''))\n"))
-(defun km/create-python-test-file (arg)
- "Create a python test file from the name of the current file.
-Unless a prefix argument ARG is given, py.test is also imported."
+(defun km/find-python-test-file-other-window (arg)
+ "Open test file for the current Python file in another window.
+If the file does not already exist, import the original Python
+file. Unless a ARG is non-nil, py.test is also imported."
(interactive "P")
(let* ((py-file (file-name-nondirectory buffer-file-name))
(test-file (concat "test_" py-file)))
@@ -32,7 +33,7 @@ If ARG, use pytest2 instead of pytest."
(compile pytest)))
(defun km/python-hook ()
- (local-set-key (kbd "C-c m t") 'km/create-python-test-file)
+ (local-set-key (kbd "C-c m t") 'km/find-python-test-file-other-window)
(local-set-key (kbd "C-c m c") 'km/pytest-compile))
(add-hook 'python-mode-hook 'km/python-hook)