MCPcopy Create free account
hub / github.com/LaunchPlatform/beanhub-cli / test_format_cmd_without_args

Function test_format_cmd_without_args

tests/test_format.py:23–37  ·  view source on GitHub ↗
(tmp_path: pathlib.Path, cli_runner: CliRunner)

Source from the content-addressed store, hash-verified

21
22
23def test_format_cmd_without_args(tmp_path: pathlib.Path, cli_runner: CliRunner):
24 beanhub_dir = tmp_path / ".beanhub"
25 beanhub_dir.mkdir()
26
27 included_bean = beanhub_dir / "mybook.bean"
28 included_bean.write_text("2024-06-27 open Assets:Cash")
29
30 main_bean = beanhub_dir / "main.bean"
31 main_bean.write_text('include "mybook.bean"')
32
33 cli_runner.mix_stderr = False
34 with switch_cwd(beanhub_dir):
35 result = cli_runner.invoke(cli, ["format"])
36 assert result.exit_code == 0
37 assert included_bean.read_text() == "2024-06-27 open Assets:Cash\n"

Callers

nothing calls this directly

Calls 1

switch_cwdFunction · 0.85

Tested by

no test coverage detected