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

Wx Test Assistants #266

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Wx Test Assistants #266

wants to merge 7 commits into from

Conversation

corranwebster
Copy link
Contributor

These are Wx versions of the GuiTestAssistant and other related code. This should not be merged until tests run cleanly. We expect significant breakage since this is running tests that would otherwise be impossible on Wx based code. They may also need work to make the tools better, safer and more cross-platform.

@codecov-io
Copy link

codecov-io commented Mar 15, 2017

Codecov Report

Merging #266 into master will decrease coverage by 11.94%.
The diff coverage is 0%.

@@             Coverage Diff             @@
##           master     #266       +/-   ##
===========================================
- Coverage    35.7%   23.76%   -11.95%     
===========================================
  Files         454      458        +4     
  Lines       25343    25694      +351     
  Branches     3805     3866       +61     
===========================================
- Hits         9048     6105     -2943     
- Misses      15890    19281     +3391     
+ Partials      405      308       -97
Impacted Files Coverage Δ
pyface/ui/wx/util/event_loop_helper.py 0% <0%> (ø)
pyface/ui/wx/util/helpers.py 0% <0%> (ø)
pyface/ui/wx/util/modal_dialog_tester.py 0% <0%> (ø)
pyface/ui/wx/python_shell.py 0% <0%> (-72.66%) ⬇️
pyface/ui/wx/util/gui_test_assistant.py 0% <0%> (ø)
pyface/ui/wx/grid/api.py 0% <0%> (-100%) ⬇️
pyface/action/tool_palette_manager.py 0% <0%> (-100%) ⬇️
pyface/dock/api.py 0% <0%> (-100%) ⬇️
pyface/ui/wx/widget.py 0% <0%> (-100%) ⬇️
pyface/ui/wx/beep.py 0% <0%> (-100%) ⬇️
... and 79 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e499888...261f4ba. Read the comment docs.

Number of times to process events. Default is 1.

"""
yield
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be in a try-finally block? If there is an exception from within the context, we would still want to process the fired events right?

Copy link
Member

Choose a reason for hiding this comment

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

Good point, I think a try-finally might be a good thing to do

if not timer.IsRunning():
# We exited the event loop on timeout
raise ConditionTimeoutError(
'Could not destroy widget before timeout: {!r}'.format(widget))
Copy link
Contributor

Choose a reason for hiding this comment

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

widget is not defined here. window instead?

Copy link
Member

Choose a reason for hiding this comment

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

That is probably true

@codecov-io
Copy link

Codecov Report

Merging #266 into master will decrease coverage by 10.19%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #266      +/-   ##
==========================================
- Coverage   36.63%   26.43%   -10.2%     
==========================================
  Files         481      485       +4     
  Lines       26424    26757     +333     
  Branches     3917     3970      +53     
==========================================
- Hits         9680     7074    -2606     
- Misses      16321    19333    +3012     
+ Partials      423      350      -73
Impacted Files Coverage Δ
pyface/ui/wx/util/gui_test_assistant.py 0% <0%> (ø)
pyface/ui/wx/util/event_loop_helper.py 0% <0%> (ø)
pyface/ui/wx/util/modal_dialog_tester.py 0% <0%> (ø)
pyface/ui/wx/python_shell.py 0% <0%> (-25%) ⬇️
pyface/ui/wx/util/helpers.py 0% <0%> (ø)
pyface/ui/wx/tasks/split_editor_area_pane.py 0% <0%> (-100%) ⬇️
pyface/action/tool_palette_manager.py 0% <0%> (-100%) ⬇️
pyface/ui/wx/fields/spin_field.py 0% <0%> (-100%) ⬇️
pyface/ui/wx/widget.py 0% <0%> (-100%) ⬇️
pyface/qt/QtNetwork.py 0% <0%> (-100%) ⬇️
... and 115 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42bdac6...0194547. Read the comment docs.

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.

4 participants