Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/openfecli/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Loading