diff --git a/src/dcqc/tests/tiff_tag_306_date_time_test.py b/src/dcqc/tests/tiff_tag_306_date_time_test.py index 3ae3443..5ec5d67 100644 --- a/src/dcqc/tests/tiff_tag_306_date_time_test.py +++ b/src/dcqc/tests/tiff_tag_306_date_time_test.py @@ -14,11 +14,12 @@ def generate_process(self) -> Process: "tifftools", "dump", f"'{path.name}'", + "--json", + "--silent", "|", - "grep", # pipe the output - "-a", # treat input as text - "-q", # suppress output - "'DateTime 306 (0x132) ASCII'", # match the DateTime 306 tag + "jq", + "-e", + "'.[].ifds[].tags[\"306\"]'", ] process = Process( container="ghcr.io/sage-bionetworks-workflows/tifftools:latest", diff --git a/tests/test_tests.py b/tests/test_tests.py index efbbfac..6d8fb6e 100644 --- a/tests/test_tests.py +++ b/tests/test_tests.py @@ -267,7 +267,7 @@ def test_that_the_tifftag306datetimetest_command_is_produced(test_targets): target = test_targets["tiff"] test = tests.TiffTag306DateTimeTest(target) process = test.generate_process() - assert "grep" in process.command + assert "jq" in process.command def test_that_the_tifftag306datetimetest_correctly_interprets_exit_code_0_and_1(