summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init/km-python.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/init/km-python.el b/init/km-python.el
index 2463ee5..d0ce6bc 100644
--- a/init/km-python.el
+++ b/init/km-python.el
@@ -11,3 +11,13 @@
"';'.join(module_completion('''%s'''))\n"
python-shell-completion-string-code
"';'.join(get_ipython().Completer.all_completions('''%s'''))\n"))
+
+(defun km/python-hook ()
+ (local-set-key (kbd "C-c m t") '(lambda ()
+ (interactive)
+ (compile "py.test")))
+ (local-set-key (kbd "C-c m T") '(lambda ()
+ (interactive)
+ (compile "py.test2"))))
+
+(add-hook 'python-mode-hook 'km/python-hook)