* - fix pytest setup that can be startet from the rootdir - support python venv environment - add pytest.ini - move common settings from .vscode/settings.json into pytest.ini - add missing requirements - fix import paths for pytests * - support python venv environment * initial version * - add missing requirements python-dotenv * fix import paths for pytests * fix pytest warnings * initial version * report 5 slowest test durations * add more vscode settings for python
38 lines
919 B
Python
38 lines
919 B
Python
from abc import abstractmethod
|
|
import logging
|
|
from asyncio import StreamReader, StreamWriter
|
|
|
|
from iter_registry import AbstractIterMeta
|
|
|
|
logger_mqtt = logging.getLogger('mqtt')
|
|
|
|
|
|
class InverterIfc(metaclass=AbstractIterMeta):
|
|
_registry = []
|
|
|
|
@abstractmethod
|
|
def __init__(self, reader: StreamReader, writer: StreamWriter,
|
|
config_id: str, prot_class,
|
|
client_mode: bool):
|
|
pass # pragma: no cover
|
|
|
|
@abstractmethod
|
|
def __enter__(self):
|
|
pass # pragma: no cover
|
|
|
|
@abstractmethod
|
|
def __exit__(self, exc_type, exc, tb):
|
|
pass # pragma: no cover
|
|
|
|
@abstractmethod
|
|
def healthy(self) -> bool:
|
|
pass # pragma: no cover
|
|
|
|
@abstractmethod
|
|
async def disc(self, shutdown_started=False) -> None:
|
|
pass # pragma: no cover
|
|
|
|
@abstractmethod
|
|
async def create_remote(self) -> None:
|
|
pass # pragma: no cover
|