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

We should handle TraitsUI helpers better in GUITestAssistant #1225

Open
corranwebster opened this issue Mar 18, 2023 · 0 comments
Open

We should handle TraitsUI helpers better in GUITestAssistant #1225

corranwebster opened this issue Mar 18, 2023 · 0 comments

Comments

@corranwebster
Copy link
Contributor

This is awkward - should perhaps just duplicate code rather than trying to import it?
See

try:
import traitsui.api # noqa: F401
except ImportError:
self.traitsui_raise_patch = None
else:
try:
import traitsui.qt # noqa: F401
self.traitsui_raise_patch = mock.patch(
"traitsui.qt.ui_base._StickyDialog.raise_"
)
except ModuleNotFoundError:
self.traitsui_raise_patch = mock.patch(
"traitsui.qt4.ui_base._StickyDialog.raise_"
)
self.traitsui_raise_patch.start()

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

No branches or pull requests

1 participant