Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test that self.bell is called in IDLE classes when intended. #71920

Open
terryjreedy opened this issue Aug 11, 2016 · 1 comment
Open

Test that self.bell is called in IDLE classes when intended. #71920

terryjreedy opened this issue Aug 11, 2016 · 1 comment
Assignees
Labels
3.10 only security fixes tests Tests in the Lib/test dir topic-IDLE type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 27733
Nosy @terryjreedy

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/terryjreedy'
closed_at = None
created_at = <Date 2016-08-11.04:04:12.476>
labels = ['expert-IDLE', 'type-feature', 'tests', '3.10']
title = 'Test that self.bell is called in IDLE classes when intended.'
updated_at = <Date 2020-06-06.18:19:20.338>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2020-06-06.18:19:20.338>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = False
closed_date = None
closer = None
components = ['IDLE', 'Tests']
creation = <Date 2016-08-11.04:04:12.476>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 27733
keywords = []
message_count = 1.0
messages = ['272397']
nosy_count = 1.0
nosy_names = ['terry.reedy']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue27733'
versions = ['Python 3.10']

@terryjreedy
Copy link
Member Author

Spinoff of bpo-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.

@terryjreedy terryjreedy self-assigned this Aug 11, 2016
@terryjreedy terryjreedy added topic-IDLE type-feature A feature request or enhancement tests Tests in the Lib/test dir labels Aug 11, 2016
@terryjreedy terryjreedy added the 3.10 only security fixes label Jun 6, 2020
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 only security fixes tests Tests in the Lib/test dir topic-IDLE type-feature A feature request or enhancement
Projects
Status: No status
Development

No branches or pull requests

1 participant