New submission from Terry J. Reedy:

Spinoff of #27732, which changed 5 tested bell-using classes to consistently 
call 'self.bell()' (instead of self.text.bell or whatever) so tests for such 
classes could replace the function with a quiet function.  For 4 of the 
classes, the replacement is currently 'lambda: None'.  For undo, it is a quiet 
mock that replaced a noisy mock wrapping and calling the original bell().  The 
purpose of the mock, either way, is to test that bell() is called when intended.

I plan to add a new idle_test.mock_tk.bell function.  I am considering having 
it automatically reset 'called' when 'called is accessed.  In any case, this 
issue is about extending the use of mock bells to other tests.

----------
assignee: terry.reedy
components: IDLE
messages: 272397
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Test that self.bell is called in IDLE classes when intended.
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27733>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to