Fix mailbox PytestCollectionWarning (#97740)

This commit is contained in:
Marc Mueller
2023-08-04 12:31:32 +02:00
committed by GitHub
parent 447479d0a0
commit 3f5a21dce4

View File

@@ -40,6 +40,9 @@ def _create_message(idx: int) -> dict[str, Any]:
class TestMailbox(mailbox.Mailbox):
"""Test Mailbox, with 10 sample messages."""
# This class doesn't contain any tests! Skip pytest test collection.
__test__ = False
def __init__(self, hass: HomeAssistant, name: str) -> None:
"""Initialize Test mailbox."""
super().__init__(hass, name)