little cleanup
This commit is contained in:
@@ -9,8 +9,6 @@ from appdaemon.models.config import AppDaemonConfig
|
|||||||
from git import Repo
|
from git import Repo
|
||||||
from pytest import Function
|
from pytest import Function
|
||||||
|
|
||||||
from .utils import delayed_stop
|
|
||||||
|
|
||||||
|
|
||||||
def pytest_collection_modifyitems(session, config, items: List[Function]):
|
def pytest_collection_modifyitems(session, config, items: List[Function]):
|
||||||
for i, item in enumerate(items):
|
for i, item in enumerate(items):
|
||||||
@@ -26,7 +24,7 @@ CONFIG_DIR = Path(__file__).parents[2] / 'conf'
|
|||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def config_repo() -> Repo:
|
def config_repo() -> Repo:
|
||||||
repo = Repo('/home/john/ad-test')
|
repo = Repo(Path(__file__).parents[2])
|
||||||
return repo
|
return repo
|
||||||
|
|
||||||
|
|
||||||
@@ -39,14 +37,11 @@ def base_config() -> AppDaemonConfig:
|
|||||||
time_zone='America/Chicago',
|
time_zone='America/Chicago',
|
||||||
config_dir=CONFIG_DIR,
|
config_dir=CONFIG_DIR,
|
||||||
config_file='appdaemon.yaml',
|
config_file='appdaemon.yaml',
|
||||||
# stop_function=lambda: print('Stopping'),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
def ad(base_config: AppDaemonConfig):
|
def ad(base_config: AppDaemonConfig):
|
||||||
# logging.getLogger('AppDaemon._app_management').setLevel('DEBUG')
|
|
||||||
|
|
||||||
loop = asyncio.new_event_loop()
|
loop = asyncio.new_event_loop()
|
||||||
|
|
||||||
ad = AppDaemon(Logging(), loop, base_config)
|
ad = AppDaemon(Logging(), loop, base_config)
|
||||||
|
|||||||
Reference in New Issue
Block a user