mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-24 04:52:33 +02:00
- Added a cli interface to the SQL copy - Repaired the SQL copy function - Added the SQL copy function to the scripts - Reduced the logging verbosity
27 lines
764 B
Python
27 lines
764 B
Python
"""Smoke-test over the logger config."""
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
from aki_prj23_transparenzregister.utils.logger_config import configer_logger
|
|
|
|
|
|
@pytest.mark.parametrize("path", [None, "test-log.log", ""])
|
|
@pytest.mark.parametrize("upper", [True, False])
|
|
@pytest.mark.parametrize("level", ["info", "debug", "error", "warning"])
|
|
def test_configer_logger(
|
|
level: str,
|
|
upper: bool,
|
|
path: Path | str | None,
|
|
) -> None:
|
|
"""Tests the configuration of the logger.
|
|
|
|
Args:
|
|
level: The log-level to configure.
|
|
upper: If the upper variant of the level should be used.
|
|
path: The path where to save the log.
|
|
"""
|
|
if level.upper():
|
|
level = level.upper()
|
|
configer_logger(level, path) # type: ignore
|