enthought / enthought/traitsui

Warning from test when clicking an disabled button (wx)

Open
#1,638 0 comments 0 reactions 0 assignees View on GitHub
priority: low toolkit: WxPython4
Dominant language
Python
Stars
306
Forks
99
PR merge metrics
No merged PRs in 30d

Description

The test suite against wx emits the following warning:
```
test_mouse_click_disabled_button (traitsui.testing.tester._ui_tester_registry.wx.tests.test_interaction_helpers.TestInteractions) ... C:\hostedtoolcache\windows\Python\3.6.8\x64\lib\site-packages\traitsui\testing\tester\_ui_tester_registry\wx\_interaction_helpers.py:70: UserWarning: Attempted to click on a non-existant or non-enabled control. Nothing was performed.
"Attempted to click on a non-existant or non-enabled control. "
ok
```

Persumably the warning is triggered by this block:
https://github.com/enthought/traitsui/blob/199d6f2a78153df0ad66b8caae5c9fb9d73dfff1/traitsui/tests/editors/test_button_editor.py#L147-L149

If the widget is actually None for whatever reasons, then raising an error or warning about it makes sense. However, when the widget is not None but is simply disabled, one can still mouse click a disabled button anyway, so the warning might not be applicable in that case.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.