diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-08-10 23:44:54 -0400 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-08-10 23:44:54 -0400 |
commit | 6c6ddb6eca31a4538857c99db9fa5038b5c8f4ba (patch) | |
tree | 6ac5e40fe0d1555406963f7416512a0157f25084 /Lib/idlelib/autoexpand.py | |
parent | 01802a3e737abb91dba58063f5941bccd103769b (diff) | |
download | cpython-6c6ddb6eca31a4538857c99db9fa5038b5c8f4ba.tar.gz |
Issue #27732: Silence test_idle with dummy bell functions.
Diffstat (limited to 'Lib/idlelib/autoexpand.py')
-rw-r--r-- | Lib/idlelib/autoexpand.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/idlelib/autoexpand.py b/Lib/idlelib/autoexpand.py index 7059054281..719060765b 100644 --- a/Lib/idlelib/autoexpand.py +++ b/Lib/idlelib/autoexpand.py @@ -31,6 +31,7 @@ class AutoExpand: def __init__(self, editwin): self.text = editwin.text + self.bell = self.text.bell self.state = None def expand_word_event(self, event): @@ -46,14 +47,14 @@ class AutoExpand: words = self.getwords() index = 0 if not words: - self.text.bell() + self.bell() return "break" word = self.getprevword() self.text.delete("insert - %d chars" % len(word), "insert") newword = words[index] index = (index + 1) % len(words) if index == 0: - self.text.bell() # Warn we cycled around + self.bell() # Warn we cycled around self.text.insert("insert", newword) curinsert = self.text.index("insert") curline = self.text.get("insert linestart", "insert lineend") @@ -99,6 +100,7 @@ class AutoExpand: i = i-1 return line[i:] + if __name__ == '__main__': import unittest unittest.main('idlelib.idle_test.test_autoexpand', verbosity=2) |