- Move test scripts to tests/ directory for better organization - Add improved YOLOv5 postprocessing with reference implementation - Update gitignore to exclude *.mflow files and include main.spec - Add debug capabilities and coordinate scaling improvements - Enhance multi-series support with proper validation - Add AGENTS.md documentation and example utilities 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
49 lines
1.6 KiB
Python
49 lines
1.6 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Test MultiDongle start/stop functionality
|
|
"""
|
|
|
|
import sys
|
|
import os
|
|
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
parent_dir = os.path.dirname(current_dir)
|
|
sys.path.insert(0, parent_dir)
|
|
|
|
def test_multidongle_start():
|
|
"""Test MultiDongle start method"""
|
|
try:
|
|
from core.functions.Multidongle import MultiDongle
|
|
|
|
# Test multi-series configuration
|
|
multi_series_config = {
|
|
"KL520": {"port_ids": [28, 32]},
|
|
"KL720": {"port_ids": [4]}
|
|
}
|
|
|
|
print("Creating MultiDongle with multi-series config...")
|
|
multidongle = MultiDongle(multi_series_config=multi_series_config)
|
|
|
|
print(f"Multi-series mode: {multidongle.multi_series_mode}")
|
|
print(f"Has _start_multi_series method: {hasattr(multidongle, '_start_multi_series')}")
|
|
print(f"Has _stop_multi_series method: {hasattr(multidongle, '_stop_multi_series')}")
|
|
|
|
print("MultiDongle created successfully!")
|
|
|
|
# Test that the required attributes exist
|
|
expected_attrs = ['send_threads', 'receive_threads', 'dispatcher_thread', 'result_ordering_thread']
|
|
for attr in expected_attrs:
|
|
if hasattr(multidongle, attr):
|
|
print(f"[OK] Has attribute: {attr}")
|
|
else:
|
|
print(f"[ERROR] Missing attribute: {attr}")
|
|
|
|
print("Test completed successfully!")
|
|
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
import traceback
|
|
traceback.print_exc()
|
|
|
|
if __name__ == "__main__":
|
|
test_multidongle_start()
|