From 4dc97d0b9ad35f25fd99e2a2d976ebdb1e2d7bcf Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Thu, 13 Jan 2022 19:29:27 +1000 Subject: [PATCH] editor: Don't ring bell during tests --- diff_edit/editor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diff_edit/editor.py b/diff_edit/editor.py index bec7aa3..d3915c4 100755 --- a/diff_edit/editor.py +++ b/diff_edit/editor.py @@ -538,7 +538,8 @@ class Editor: self.quit() def ring_bell(self): - print("\a", end="") + if "unittest" not in sys.modules: + print("\a", end="") def undo(self): self.text_widget[:], self._cursor_x, self._cursor_y = self.history.pop()