Skip to content

Commit 73eb420

Browse files
committed
Add test for processor control re-enable
Adds a GUI regression test to ensure processor-related controls are disabled while inference is active and properly re-enabled when it stops. Also updates plugin system docs by fixing a description typo and aligning the toggle name to "Use custom processor".
1 parent 87e7932 commit 73eb420

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

dlclivegui/processors/PLUGIN_SYSTEM.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Each processor class should define metadata attributes to help GUI discovery:
5858
```python
5959
class MyProcessorSocket(BaseProcessorSocket):
6060
PROCESSOR_NAME = "Use Pose Processor" # Human-readable
61-
PROCESSOR_DESCRIPTION = "BBroadcasts processed pose values"
61+
PROCESSOR_DESCRIPTION = "Broadcasts processed pose values"
6262
PROCESSOR_PARAMS = {
6363
"bind": {
6464
"type": "tuple",
@@ -160,7 +160,7 @@ New processor modules should rely on subclass discovery instead of defining a re
160160

161161
### Recommended behavior
162162

163-
To keep processor behavior explicit and opt-in, the GUI provides an **Allow processor-based control** toggle with these effects:
163+
To keep processor behavior explicit and opt-in, the GUI provides an **Use custom processor** toggle with these effects:
164164

165165
- **Disabled by default:**
166166
- The GUI does **not instantiate** any processor plugin

tests/gui/test_main.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,25 @@ def test_dlc_settings_from_ui_validates_detected_model_type(
175175

176176
assert settings.model_type == "pytorch"
177177
assert isinstance(settings.model_type, str)
178+
179+
180+
def test_processor_controls_reenabled_after_inference_stops(
181+
window,
182+
):
183+
window._dlc_active = True
184+
window._update_dlc_controls_enabled()
185+
186+
assert not window.processor_folder_edit.isEnabled()
187+
assert not window.browse_processor_folder_button.isEnabled()
188+
assert not window.refresh_processors_button.isEnabled()
189+
assert not window.processor_combo.isEnabled()
190+
assert not window.use_custom_proc_checkbox.isEnabled()
191+
192+
window._dlc_active = False
193+
window._update_dlc_controls_enabled()
194+
195+
assert window.processor_folder_edit.isEnabled()
196+
assert window.browse_processor_folder_button.isEnabled()
197+
assert window.refresh_processors_button.isEnabled()
198+
assert window.processor_combo.isEnabled()
199+
assert window.use_custom_proc_checkbox.isEnabled()

0 commit comments

Comments
 (0)