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

Update new test_editor_error_msg #1553

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

aaronayres35
Copy link
Contributor

Hopefully fixes #1551

The intermittent test failure first appeared in pr #1546, and after my realization on #1540 I am suspect of auto_process_events on UITester being relevant here as well (although this is still more of a hunch than a well understood solution). This PR sets auto_process_events=False (the test still runs as expected with ModalDialogTester taking the full event processing responsibility, so even if this was not the cause of 1551 this change is still viable).

In addition, looking back at the test from 1546 and looking more closely at the code in ModalDialogTester, I realize that the text arg in has_widget corresponds to the text the widget holds which is the same value regardless of the format (it was not corresponding to the text actually displayed by the widget) so the previous test wasn't really hitting the core issue. I added an assert statement explicitly checking the textFormat matches what it was set to.

@aaronayres35
Copy link
Contributor Author

#1551 is not occurring which is a good sign! Doesn't guarantee it is resolved though as it did not occur on every run in 1546

Copy link
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aaronayres35 aaronayres35 merged commit 974bbda into master Mar 25, 2021
@aaronayres35 aaronayres35 deleted the fix/1551-set-auto_process_events-false branch March 25, 2021 12:04
@aaronayres35 aaronayres35 mentioned this pull request Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intermittent failures in traitsui.tests.editors.test_html_editor.py
2 participants