Initial implementation of tests for modal operators

This commit is contained in:
Bruno Perdigão
2026-04-28 14:03:24 -03:00
committed by Bruno Perdigão
parent f6e95c8e8e
commit cd482a7874
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -360,6 +360,14 @@ else
pytest test/tool/test_$(MODULE).py --maxfail=1
endif
.PHONY: test-modal
test-modal:
ifndef MODULE
blender --enable-event-simulate --python test/modal/test_snap.py
else
blender --enable-event-simulate --python test/modal/test_$(MODULE).py
endif
# Reregistering test is not added to the standard test suite because during unregister
# Blender removes all Bonsai dependencies breaking dev-environment symlinks.
.PHONY: test-reregister
@@ -75,6 +75,7 @@ class PolylineOperator:
self.is_typing = False
self.snap_angle = None
self.snapping_points = []
self.unit_scale = 1.0
self.instructions = {
"Cycle Input": {"icons": True, "keys": ["EVENT_TAB"]},
"Distance Input": {"icons": True, "keys": ["EVENT_D"]},