ref: Add ALL ruff rules for tests (#4183)

Add ALL ruff rules for tests
This commit is contained in:
Christophe Bornet 2024-10-19 22:41:37 +02:00 • committed by GitHub
commit f96f2eaf8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 421 additions and 361 deletions

View file

@ -90,9 +90,9 @@ class TestEventManager:
queue = asyncio.Queue()
manager = EventManager(queue)
with pytest.raises(ValueError):
with pytest.raises(ValueError, match="Event name cannot be empty"):
manager.register_event("", "test_type", mock_callback)
with pytest.raises(ValueError):
with pytest.raises(ValueError, match="Event name must start with 'on_'"):
manager.register_event("invalid_name", "test_type", mock_callback)
# Sending an event with complex data and verifying successful event transmission