@@ -51,14 +51,14 @@ def test_cli_bundle_success(caplog, tmp_path):
5151 # Invoke command.
5252 result = runner .invoke (
5353 cli ,
54- args = ["bundle" ],
54+ args = ["bundle" , "--format" , "llm" ],
5555 env = {"ABOUT_OUTLINE_URL" : TESTING_OUTLINE_FILE , "OUTDIR" : str (tmp_path )},
5656 catch_exceptions = False ,
5757 )
5858 assert result .exit_code == 0 , result .output
5959
6060 # Verify log output.
61- assert "Bundling llms-txt" in caplog .text
61+ assert "Creating bundle. Format: llms-txt" in caplog .text
6262 assert "Ready." in caplog .text
6363
6464 # Verify that the expected output files have been created.
@@ -72,7 +72,7 @@ def test_cli_bundle_without_outdir():
7272 # Invoke command without OUTDIR environment variable.
7373 result = runner .invoke (
7474 cli ,
75- args = ["bundle" ],
75+ args = ["bundle" , "--format" , "llm" ],
7676 env = {}, # No OUTDIR set
7777 catch_exceptions = False ,
7878 )
@@ -82,6 +82,22 @@ def test_cli_bundle_without_outdir():
8282 assert "Error: Missing option '--outdir' / '-o'" in result .output
8383
8484
85+ def test_cli_bundle_without_format (tmp_path ):
86+ runner = CliRunner ()
87+
88+ # Invoke command.
89+ result = runner .invoke (
90+ cli ,
91+ args = ["bundle" ],
92+ env = {"OUTDIR" : str (tmp_path )},
93+ catch_exceptions = False ,
94+ )
95+
96+ # Verify appropriate error handling.
97+ assert result .exit_code != 0 , result .output
98+ assert "Error: Missing option '--format' / '-f'" in result .output
99+
100+
85101def test_cli_bundle_invalid_format (tmp_path ):
86102 runner = CliRunner ()
87103
@@ -95,4 +111,4 @@ def test_cli_bundle_invalid_format(tmp_path):
95111
96112 # Verify appropriate error handling.
97113 assert result .exit_code != 0 , result .output
98- assert "Error: Invalid output format: foobar" in result .output
114+ assert "Error: Invalid value for '-- format' / '-f': ' foobar' is not 'llm' " in result .output
0 commit comments