removed single use functions
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import asyncio
|
||||
import re
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
import pytest
|
||||
from appdaemon.appdaemon import AppDaemon
|
||||
from git import Repo
|
||||
|
||||
|
||||
async def delayed_stop(ad: AppDaemon, delay: float):
|
||||
@@ -39,3 +41,9 @@ def get_loaded_apps(caplog: pytest.LogCaptureFixture):
|
||||
def count_error_lines(caplog: pytest.LogCaptureFixture) -> int:
|
||||
error_log_lines = [msg for name, lvl, msg in caplog.record_tuples if name.startswith('Error')]
|
||||
return len(error_log_lines)
|
||||
|
||||
|
||||
def reset_file(repo: Repo, changed: Path):
|
||||
if not changed.is_absolute():
|
||||
changed = Path(repo.working_tree_dir) / changed
|
||||
repo.git.checkout('HEAD', '--', changed)
|
||||
|
||||
Reference in New Issue
Block a user