feat: added property callbacks, added warnings

This commit is contained in:
Mose Müller
2023-08-02 12:06:19 +02:00
parent 8e7568b57f
commit 206a831473
7 changed files with 549 additions and 41 deletions

View File

@ -1,8 +1,20 @@
from collections.abc import Generator
from typing import Any
import pytest
from loguru import logger
from pytest import LogCaptureFixture
from pyDataInterface import DataService
@pytest.fixture
def caplog(caplog: LogCaptureFixture) -> Generator[LogCaptureFixture, Any, None]:
handler_id = logger.add(caplog.handler, format="{message}")
yield caplog
logger.remove(handler_id)
def emit(self: Any, parent_path: str, name: str, value: Any) -> None:
if isinstance(value, DataService):
value = value.serialize()