summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/python-tests.el
diff options
context:
space:
mode:
authorVibhav Pant <vibhavp@gmail.com>2017-01-30 18:35:43 +0530
committerVibhav Pant <vibhavp@gmail.com>2017-01-30 18:35:43 +0530
commitbf7f7c0d82a56ed1b76358657e74ca2833b19fe2 (patch)
tree90f357b4a735ca7c90d1881ef9948186b9f919df /test/lisp/progmodes/python-tests.el
parent25d38a06eceb0853190a2d9acf53d85686f524bd (diff)
parent9c4dfdd1af9f97c6a8d7e922b68a39052116790c (diff)
downloademacs-bf7f7c0d82a56ed1b76358657e74ca2833b19fe2.tar.gz
emacs-bf7f7c0d82a56ed1b76358657e74ca2833b19fe2.tar.bz2
emacs-bf7f7c0d82a56ed1b76358657e74ca2833b19fe2.zip
Merge remote-tracking branch 'origin/master' into feature/byte-switch
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
-rw-r--r--test/lisp/progmodes/python-tests.el23
1 files changed, 22 insertions, 1 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index 2df1bbf50d8..1e6b867d30b 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -1156,6 +1156,27 @@ if do:
(python-tests-look-at "that)")
(should (= (current-indentation) 6))))
+(ert-deftest python-indent-electric-colon-4 ()
+ "Test indentation case where there is one more-indented previous open block."
+ (python-tests-with-temp-buffer
+ "
+def f():
+ if True:
+ a = 5
+
+ if True:
+ a = 10
+
+ b = 3
+
+else
+"
+ (python-tests-look-at "else")
+ (goto-char (line-end-position))
+ (python-tests-self-insert ":")
+ (python-tests-look-at "else" -1)
+ (should (= (current-indentation) 4))))
+
(ert-deftest python-indent-region-1 ()
"Test indentation case from Bug#18843."
(let ((contents "
@@ -2457,7 +2478,7 @@ if x:
(python-tests-with-temp-buffer
" \"\n"
(goto-char (point-min))
- (font-lock-fontify-buffer)))
+ (call-interactively 'font-lock-fontify-buffer)))
;;; Shell integration