Skip to content

Commit eba23af

Browse files
committed
test: add logging setup fixture
1 parent 493ad72 commit eba23af

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎tests/utils/test_utils_install_display.py‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
import logging
2+
3+
import pytest
4+
15
from my_unicorn.core.install import (
26
display_no_targets_error,
37
print_install_summary,
48
)
59

610

7-
def test_display_no_targets_error(caplog):
11+
@pytest.fixture(autouse=True)
12+
def _caplog_setup(caplog):
13+
caplog.set_level(logging.INFO, logger="my_unicorn")
14+
15+
16+
def test_display_no_targets_error():
817
"""Test display_no_targets_error shows error and help message."""
918
from unittest.mock import patch
1019

@@ -18,6 +27,7 @@ def test_display_no_targets_error(caplog):
1827

1928

2029
def test_print_install_summary_all_already_installed(caplog):
30+
2131
results = [
2232
{
2333
"target": "app1",
@@ -33,6 +43,7 @@ def test_print_install_summary_all_already_installed(caplog):
3343

3444

3545
def test_print_install_summary_mixed(caplog):
46+
3647
results = [
3748
{
3849
"target": "app1",

0 commit comments

Comments
 (0)