aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/idlelib/idle_test/test_autocomplete.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-07-24 23:01:28 -0400
committerTerry Jan Reedy <tjreedy@udel.edu>2016-07-24 23:01:28 -0400
commitc665dfd73e330213008f6422c25b5a115a541776 (patch)
tree42b888927fcfda7b7bc7241388c1f54012bfe4d8 /Lib/idlelib/idle_test/test_autocomplete.py
parent996d72bccf2bc6d7d0be2ae1280186e68a0a1663 (diff)
downloadcpython-c665dfd73e330213008f6422c25b5a115a541776.tar.gz
cpython-c665dfd73e330213008f6422c25b5a115a541776.zip
Issue #19198: IDLE: tab after initial whitespace should tab, not autocomplete.
Fixes problem with writing docstrings at lease twice indented.
Diffstat (limited to 'Lib/idlelib/idle_test/test_autocomplete.py')
-rw-r--r--Lib/idlelib/idle_test/test_autocomplete.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/idlelib/idle_test/test_autocomplete.py b/Lib/idlelib/idle_test/test_autocomplete.py
index a14c6db349a..97bfab5a569 100644
--- a/Lib/idlelib/idle_test/test_autocomplete.py
+++ b/Lib/idlelib/idle_test/test_autocomplete.py
@@ -97,6 +97,11 @@ class AutoCompleteTest(unittest.TestCase):
self.assertIsNone(autocomplete.autocomplete_event(ev))
del ev.mc_state
+ # Test that tab after whitespace is ignored.
+ self.text.insert('1.0', ' """Docstring.\n ')
+ self.assertIsNone(autocomplete.autocomplete_event(ev))
+ self.text.delete('1.0', 'end')
+
# If autocomplete window is open, complete() method is called
self.text.insert('1.0', 're.')
# This must call autocomplete._make_autocomplete_window()