From 910086507bbb7d666daba8462fc209e9cfa910da Mon Sep 17 00:00:00 2001 From: Xyphuz Date: Thu, 26 May 2022 11:10:19 +0800 Subject: [PATCH] fix: wrong expected value in tests --- tests/test_cli.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index bfcdbcd..4e2f37e 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -24,11 +24,12 @@ runner = CliRunner() ) def test_cli(test_file_path: str) -> None: input_path = f"{test_file_path}" - output_path = "compose-viz-test.png" - result = runner.invoke(cli.app, ["-o", output_path, input_path]) + output_filename = "compose-viz-test" + default_format = "png" + result = runner.invoke(cli.app, ["-o", output_filename, input_path]) assert result.exit_code == 0 assert f"Successfully parsed {input_path}\n" in result.stdout - assert os.path.exists(output_path) + assert os.path.exists(f"{output_filename}.{default_format}") - os.remove(output_path) + os.remove(f"{output_filename}.{default_format}")