From 8789fc4f40c7a0dd4ef707644ce1622fd2b56e21 Mon Sep 17 00:00:00 2001 From: James Beilsten-Edmands <30625594+jbeilstenedmands@users.noreply.github.com> Date: Thu, 25 Jan 2024 16:58:15 +0000 Subject: [PATCH] Test it works both ways --- tests/command_line/test_export_bitmaps.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/command_line/test_export_bitmaps.py b/tests/command_line/test_export_bitmaps.py index 5bcfde7b6f..ec8a24ce52 100644 --- a/tests/command_line/test_export_bitmaps.py +++ b/tests/command_line/test_export_bitmaps.py @@ -103,16 +103,14 @@ def test_export_multiple_bitmaps_with_specified_output_filename_fails( ) -def test_export_single_cbf(dials_data, tmp_path): +@pytest.mark.parametrize("set_imageset_index", [True, False]) +def test_export_single_cbf(dials_data, tmp_path, set_imageset_index): image = str(dials_data("centroid_test_data", pathlib=True) / "centroid_0002.cbf") - export_bitmaps.run( - [ - image, - f"output.directory={tmp_path}", - "imageset_index=1", - ], - ) + cmd = [image, f"output.directory={tmp_path}"] + if set_imageset_index: + cmd.append("imageset_index=1") + export_bitmaps.run(cmd) assert tmp_path.joinpath("image0002.png").is_file()