- Add a regression test verifying operator search respects poll() and
only exposes an operator when its poll condition is satisfied.
- Add a poll sweep test that checks registered operators across
supported editor types and verifies poll() always returns a `bool`
without raising exceptions.
- Add a `poll_sweep()` helper that reuses a single area while switching
editor types and runs each operator's `poll()` under the
appropriate window, area, and region context.
Pull Request: https://projects.blender.org/blender/blender/pulls/162764
Editor initialization by dynamically constructing a grid layout,
iterating through all settable editor variants, applying editor-specific
modes/subtypes, and validating successful initialization of each editor
instance.
These tests already proved themselves useful, we already found and fixed
a number of issues during development.
Pull Request: https://projects.blender.org/blender/blender/pulls/158780
This commit introduces a new `WM_event_handling_break` API, that allows
some code executed during event handling (e.g. operators etc.) to
request the `WM_main` main event loop to stop processing the event
queues and to do a full loop (including redraw step) before resuming
handling of the events.
`test_undo.py` undo tests had to be modified to add a small delay when
batch-triggering undo/redo events, to give Blender enough time to
process all the relevant events and reach the expected state.
Co-authored-by: Campbell Barton <ideasman42@noreply.localhost>
Pull Request: https://projects.blender.org/blender/blender/pulls/156375
Adds basic tests for the following types of operations:
* Hide
* Mask
* Face Set
* Trim
With the following types of gesture / selection modes:
* Box
* Lasso
* Line
Note that "Polyline" is not explicitly tested for now, since it is
primarily a form of the lasso tool that requires clicks to define the
area.
A new helper method is also added to `ui_test_utils.py` for drawing
the path of a circle.
Pull Request: https://projects.blender.org/blender/blender/pulls/153790
* Some functions were copied between tests, now import a common
module for these.
* Merge _test_vars and _test_window into a single function, and
use the window index instead of excluding windows.
* Rename idle_until to not be a hack, and explain that it can be
used for testing operator jobs while keeping the disclaimer that
it should not typically be used.
Pull Request: https://projects.blender.org/blender/blender/pulls/153159
After creating a new scene in a separate window when performing UI
tests, the respective view layer for the window may not be updated
immediately in the event loop.
Previously, this was mitigated with a single `yield` statement that
would delay processing by a single tick. To fix this issue, this commit
adds the capability to yield for a specific `timedelta` and waits this
amount of time for the two affected tests.
Pull Request: https://projects.blender.org/blender/blender/pulls/136012