From 295b95ed7453caa0c534f6002fd7f77c9709d999 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Thu, 12 Feb 2026 14:13:59 -0800 Subject: [PATCH] WIP:tests should catch logging import error --- src/openfecli/tests/test_cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openfecli/tests/test_cli.py b/src/openfecli/tests/test_cli.py index 8c13ac8e7..9c74974ff 100644 --- a/src/openfecli/tests/test_cli.py +++ b/src/openfecli/tests/test_cli.py @@ -7,6 +7,8 @@ from openfecli.cli import OpenFECLI, main from openfecli.plugins import OFECommandPlugin +from .utils import assert_click_success + @click.command("null-command", short_help="Do nothing (testing)") def null_command(): @@ -65,7 +67,7 @@ def test_get_installed_plugins(self, cli): assert len(plugins) > 0 -@pytest.mark.parametrize("with_log", [True, False]) +@pytest.mark.parametrize("with_log", [False, True]) def test_main_log(with_log): logged_text = "Running null command\n" logfile_text = "\n".join( @@ -105,6 +107,7 @@ def test_main_log(with_log): with null_command_context(main): result = runner.invoke(main, invocation) + assert_click_success(result) found = result.stdout_bytes assert found.decode("utf-8") == expected