Fixed --print to work with {tab}

This commit is contained in:
Rhet Turnbull
2022-08-27 11:11:38 -07:00
parent b12d112793
commit af9311c9c8
3 changed files with 4 additions and 4 deletions

View File

@@ -89,4 +89,4 @@ def dump(
for rendered_template in rendered_templates: for rendered_template in rendered_templates:
if not rendered_template: if not rendered_template:
continue continue
rich_click_echo(rendered_template) print(rendered_template)

View File

@@ -414,7 +414,7 @@ def query(
for rendered_template in rendered_templates: for rendered_template in rendered_templates:
if not rendered_template: if not rendered_template:
continue continue
rich_click_echo(rendered_template) print(rendered_template)
if not quiet: if not quiet:
print_photo_info(photos, cli_json or json_, print_func=click.echo) print_photo_info(photos, cli_json or json_, print_func=click.echo)

View File

@@ -63,9 +63,9 @@ def test_dump_print(photos):
db_path, db_path,
"--deleted", "--deleted",
"--print", "--print",
"{uuid}_{photo.original_filename}", "{uuid}{tab}{photo.original_filename}",
], ],
) )
assert result.exit_code == 0 assert result.exit_code == 0
for photo in photos: for photo in photos:
assert f"{photo.uuid}_{photo.original_filename}" in result.output assert f"{photo.uuid}\t{photo.original_filename}" in result.output