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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)