Moved test scripts
This commit is contained in:
48
tests/test_mouse_behavior.py
Normal file
48
tests/test_mouse_behavior.py
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Test script to compare mouse movement behavior
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
import time
|
||||
|
||||
# Add src directory to path
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'src'))
|
||||
|
||||
from mouse_mover import MouseMover
|
||||
from logging_config import setup_logging, get_logger
|
||||
|
||||
def test_mouse_movement():
|
||||
"""Test the mouse movement behavior"""
|
||||
setup_logging(debug=True)
|
||||
logger = get_logger(__name__)
|
||||
|
||||
print("🧪 Testing Mouse Movement Behavior")
|
||||
print("========================================")
|
||||
|
||||
# Create mouse mover with short wait time for testing
|
||||
mouse_mover = MouseMover(wait_time=10, move_px=10) # 10 second wait for testing
|
||||
|
||||
print("Starting mouse movement monitoring...")
|
||||
print("Watch for automatic mouse movement every 10 seconds when idle")
|
||||
print("Move your mouse to reset the timer")
|
||||
print("Press Ctrl+C to stop")
|
||||
|
||||
try:
|
||||
mouse_mover.start()
|
||||
|
||||
# Monitor for a while
|
||||
for i in range(60): # Run for 1 minute
|
||||
status = mouse_mover.get_status()
|
||||
print(f"Status: Running={status['running']}, Countdown={status['countdown']}s")
|
||||
time.sleep(1)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("\nStopping...")
|
||||
finally:
|
||||
mouse_mover.stop()
|
||||
print("Test completed!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_mouse_movement()
|
||||
Reference in New Issue
Block a user