(tmp_path: pathlib.Path, cli_runner: CliRunner)
| 21 | |
| 22 | |
| 23 | def 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" |
nothing calls this directly
no test coverage detected