From 95cf8324a9e79f4eb9f31739d5eeaa12c4fcc48c Mon Sep 17 00:00:00 2001 From: mrbean-bremen Date: Sat, 23 Nov 2024 20:27:02 +0100 Subject: [PATCH] Update the tests to use current version 2024e --- .github/workflows/testsuite.yml | 4 ++-- CHANGES.md | 3 +++ .../tests/fixtures/standard/editions.json | 2 +- dicom_validator/tests/spec_reader/conftest.py | 2 +- .../tests/spec_reader/test_part3_reader.py | 22 +++++++++---------- .../tests/spec_reader/test_part6_reader.py | 8 +++---- dicom_validator/tests/test_cmdline_tools.py | 2 +- dicom_validator/tests/validator/conftest.py | 2 +- 8 files changed, 24 insertions(+), 21 deletions(-) diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 720695e..6f6a1b3 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -26,7 +26,7 @@ jobs: uses: actions/cache@v4 with: path: dicom_validator/tests/fixtures/standard - key: "2015b_2024c" + key: "2015b_2024e" enableCrossOsArchive: true - name: Download DICOM standard @@ -34,7 +34,7 @@ jobs: run: | pip install -e . python .github/workflows/get_revision.py 2015b "`pwd`/dicom_validator/tests/fixtures/standard" - python .github/workflows/get_revision.py 2024c "`pwd`/dicom_validator/tests/fixtures/standard" + python .github/workflows/get_revision.py 2024e "`pwd`/dicom_validator/tests/fixtures/standard" - name: Install dependencies run: | diff --git a/CHANGES.md b/CHANGES.md index c48eabb..8a15af7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,9 @@ # Dicom Validator Release Notes The released versions correspond to PyPi releases. +### Infrastructure +* update the tests for current version 2024e + ## [Version 0.6.3](https://pypi.python.org/pypi/dicom-validator/0.6.3) (2024-10-24) Bugfix release. diff --git a/dicom_validator/tests/fixtures/standard/editions.json b/dicom_validator/tests/fixtures/standard/editions.json index cd1dcbf..a59307b 100644 --- a/dicom_validator/tests/fixtures/standard/editions.json +++ b/dicom_validator/tests/fixtures/standard/editions.json @@ -1 +1 @@ -["2014a", "2014b", "2014c", "2015a", "2015b", "2015c", "2016a", "2016b", "2016c", "2016d", "2016e", "2017a", "2017b", "2017c", "2017d", "2017e", "2018a", "2018b", "2018c", "2018d", "2018e", "2019a", "2019b", "2019c", "2019d", "2019e", "2020a", "2020b", "2020c", "2020d", "2020e", "2021a", "2021b", "2021c", "2021d", "2021e", "2022a", "2022b", "2022c", "2022d", "2022e", "2023a", "2023b", "2023c", "2023d", "2023e", "2024a", "2024b", "2024c"] +["2014a", "2014b", "2014c", "2015a", "2015b", "2015c", "2016a", "2016b", "2016c", "2016d", "2016e", "2017a", "2017b", "2017c", "2017d", "2017e", "2018a", "2018b", "2018c", "2018d", "2018e", "2019a", "2019b", "2019c", "2019d", "2019e", "2020a", "2020b", "2020c", "2020d", "2020e", "2021a", "2021b", "2021c", "2021d", "2021e", "2022a", "2022b", "2022c", "2022d", "2022e", "2023a", "2023b", "2023c", "2023d", "2023e", "2024a", "2024b", "2024c", "2024d", "2024e"] diff --git a/dicom_validator/tests/spec_reader/conftest.py b/dicom_validator/tests/spec_reader/conftest.py index 8bfa963..36c2d93 100644 --- a/dicom_validator/tests/spec_reader/conftest.py +++ b/dicom_validator/tests/spec_reader/conftest.py @@ -3,7 +3,7 @@ import pytest -CURRENT_REVISION = "2024c" +CURRENT_REVISION = "2024e" def pytest_configure(config): diff --git a/dicom_validator/tests/spec_reader/test_part3_reader.py b/dicom_validator/tests/spec_reader/test_part3_reader.py index 7b8a747..362f8c4 100644 --- a/dicom_validator/tests/spec_reader/test_part3_reader.py +++ b/dicom_validator/tests/spec_reader/test_part3_reader.py @@ -50,7 +50,7 @@ def test_read_incomplete_doc_file(self, fs): @pytest.mark.parametrize( "revision,iod_name", - [("2015b", "Computed Tomography Image IOD"), ("2024c", "CT Image IOD")], + [("2015b", "Computed Tomography Image IOD"), ("2024e", "CT Image IOD")], indirect=["revision"], scope="session", ) @@ -64,7 +64,7 @@ def test_lookup_sop_class(self, reader, iod_name): @pytest.mark.parametrize( "revision,module_nr", - [("2015b", 27), ("2024c", 28)], + [("2015b", 27), ("2024e", 29)], indirect=["revision"], scope="session", ) @@ -78,7 +78,7 @@ def test_get_iod_modules(self, reader, module_nr): assert module["ref"] == "C.7.5.1" assert module["use"] == "M" - @pytest.mark.parametrize("revision", ["2015b", "2024c"], indirect=True) + @pytest.mark.parametrize("revision", ["2015b", "2024e"], indirect=True) def test_optional_iod_module(self, reader): description = reader.iod_description(chapter="A.38.1") assert "modules" in description @@ -90,7 +90,7 @@ def test_optional_iod_module(self, reader): @pytest.mark.parametrize( "revision,desc_nr", - [("2015b", 110), ("2024c", 154)], + [("2015b", 110), ("2024e", 155)], indirect=["revision"], scope="session", ) @@ -103,7 +103,7 @@ def test_iod_descriptions(self, reader, desc_nr): @pytest.mark.parametrize( "revision,macro_nr", - [("2015b", 24), ("2024c", 27)], + [("2015b", 24), ("2024e", 28)], indirect=["revision"], scope="session", ) @@ -137,7 +137,7 @@ def test_group_macros(self, reader, macro_nr): @pytest.mark.parametrize( "revision,desc_nr", - [("2015b", 9), ("2024c", 14)], + [("2015b", 9), ("2024e", 14)], indirect=["revision"], scope="session", ) @@ -152,7 +152,7 @@ def test_module_description(self, reader, desc_nr): @pytest.mark.parametrize( "revision,desc_nr, seq_desc_nr", - [("2015b", 3, 3), ("2024c", 7, 4)], + [("2015b", 3, 3), ("2024e", 7, 4)], indirect=["revision"], scope="session", ) @@ -183,7 +183,7 @@ def test_referenced_macro(self, reader): @pytest.mark.parametrize( "revision,desc_nr", - [("2015b", 451), ("2024c", 577)], + [("2015b", 451), ("2024e", 583)], indirect=["revision"], scope="session", ) @@ -193,7 +193,7 @@ def test_module_descriptions(self, reader, desc_nr): @pytest.mark.parametrize( "revision,include_nr", - [("2015b", 9), ("2024c", 10)], + [("2015b", 9), ("2024e", 10)], indirect=["revision"], scope="session", ) @@ -226,7 +226,7 @@ def test_parsed_enum_values(self, reader): assert enums == [{"val": ["FAILURE", "WARNING", "INFORMATIVE"]}] @pytest.mark.parametrize( - "revision", ["2015b", "2024c"], indirect=True, scope="session" + "revision", ["2015b", "2024e"], indirect=True, scope="session" ) def test_linked_enum_values(self, reader): description = reader.module_description("10.24") @@ -239,7 +239,7 @@ def test_linked_enum_values(self, reader): assert tag["enums"] == [{"val": ["CONTINUOUS", "TRIGGERED", "AUTOMATIC"]}] @pytest.mark.parametrize( - "revision", ["2015b", "2024c"], indirect=True, scope="session" + "revision", ["2015b", "2024e"], indirect=True, scope="session" ) def test_graphic_annotation_sequence(self, reader): description = reader.module_description("C.10.5") diff --git a/dicom_validator/tests/spec_reader/test_part6_reader.py b/dicom_validator/tests/spec_reader/test_part6_reader.py index a508c74..67f2da8 100644 --- a/dicom_validator/tests/spec_reader/test_part6_reader.py +++ b/dicom_validator/tests/spec_reader/test_part6_reader.py @@ -15,17 +15,17 @@ def test_data_element(self, dict_reader): def test_data_elements(self, dict_reader): elements = dict_reader.data_elements() - assert len(elements) == 5092 + assert len(elements) == 5197 def test_sop_class_uids(self, dict_reader): sop_class_uids = dict_reader.sop_class_uids() - assert len(sop_class_uids) == 304 + assert len(sop_class_uids) == 308 assert "1.2.840.10008.1.1" in sop_class_uids assert sop_class_uids["1.2.840.10008.1.1"] == "Verification SOP Class" def test_uid_type(self, dict_reader): xfer_syntax_uids = dict_reader.uids("Transfer Syntax") - assert len(xfer_syntax_uids) == 59 + assert len(xfer_syntax_uids) == 62 assert "1.2.840.10008.1.2.4.80" in xfer_syntax_uids assert ( xfer_syntax_uids["1.2.840.10008.1.2.4.80"] @@ -38,7 +38,7 @@ def test_all_uids(self, dict_reader): assert "Transfer Syntax" in uids assert "SOP Class" in uids uid_nr = sum([len(uid_dict) for uid_dict in uids.values()]) - assert uid_nr == 454 + assert uid_nr == 461 def test_sop_class_name(self, dict_reader): assert ( diff --git a/dicom_validator/tests/test_cmdline_tools.py b/dicom_validator/tests/test_cmdline_tools.py index ddc84ea..0655041 100644 --- a/dicom_validator/tests/test_cmdline_tools.py +++ b/dicom_validator/tests/test_cmdline_tools.py @@ -22,7 +22,7 @@ def dicom_fixture_path(fixture_path): @pytest.mark.order(0) -@pytest.mark.parametrize("revision", ["2015b", "2024c"]) +@pytest.mark.parametrize("revision", ["2015b", "2024e"]) def test_validate_sr(revision, caplog, standard_path, dicom_fixture_path): # test also for 2015b to test an issue causing an exception rtdose_path = dicom_fixture_path / "rtdose.dcm" diff --git a/dicom_validator/tests/validator/conftest.py b/dicom_validator/tests/validator/conftest.py index 7211d0e..788d755 100644 --- a/dicom_validator/tests/validator/conftest.py +++ b/dicom_validator/tests/validator/conftest.py @@ -7,7 +7,7 @@ from dicom_validator.spec_reader.edition_reader import EditionReader from dicom_validator.validator.iod_validator import DicomInfo -CURRENT_REVISION = "2024c" +CURRENT_REVISION = "2024e" def pytest_configure(config):