1
0

Accepting request 1009305 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1009305
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydicom?expand=0&rev=12
This commit is contained in:
Richard Brown 2022-10-11 16:02:41 +00:00 committed by Git OBS Bridge
commit cebd87813d
2 changed files with 15 additions and 26 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Oct 10 07:20:51 UTC 2022 - John Vandenberg <jayvdb@gmail.com>
- Add BD pydicom-data test data, and unskip many tests that now pass
-------------------------------------------------------------------
Sat Sep 24 02:04:40 UTC 2022 - John Vandenberg <jayvdb@gmail.com>

View File

@ -31,6 +31,7 @@ BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module pydicom-data}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests}
BuildRequires: python3-gdcm
@ -67,37 +68,20 @@ and radiotherapy objects.
%check
export LANG=en_US.UTF-8
# Many test modules and individual tests fail due to test data not included in sdist
# And requires https://github.com/pydicom/pydicom-data , which hasnt been
# packaged yet. c.f. https://github.com/pydicom/pydicom-data/issues/9
skips="test_fetch_data_files or test_reading_ds_with_known_tags_with_UN_VR or test_empty_bot_multi_fragments_per_frame"
skips="$skips or test_convert_rgb_from_implicit_to_explicit_vr or test_empty_bot_too_few_fragments or test_encapsulate"
skips="$skips or test_sequence_with_implicit_vr or test_rgb_ybr_rgb_single_frame or test_rgb_ybr_rgb_multi_frame or test_frame_by_frame"
skips="$skips or test_specific_tags_with_unknown_length_tag or test_tag_with_unknown_length_tag_too_short or test_planar_config"
skips="$skips or test_correct_ambiguous_vr_compressed or test_write_removes_grouplength or test_raw_elements_preserved_explicit_vr"
skips="$skips or test_cycle_u8_1s_1f or test_encoders_gdcm or test_unsupported_syntax_raises or test_can_access_unsupported_dataset"
skips="$skips or TestDatasetOverlayArray or TestGDCM_JPEG_LS_no_gdcm or TestGDCM_JPEG2000_no_gdcm or TestGDCM_JPEGlossy_no_gdcm"
skips="$skips or TestGDCM_JPEGlossless_no_gdcm or TestEncodeFrame or TestEncodeSegment or TestRLEEncodeFrame or TestNumpy_ModalityLUT"
skips="$skips or TestNumpy_PaletteColor or TestNumpy_ApplyWindowing or TestNumpy_ApplyVOI or (TestNumpy_PackBits and test_functional)"
skips="$skips or TestNumpy_NumpyHandler or TestNumpy_GetOverlayArray or TestNumpy_NoRLEHandler or TestNumpy_RLEHandler"
skips="$skips or TestPillowHandler_JPEG2K or TestPillowHandler_JPEG"
skips="test_fetch_data_files"
# see https://github.com/pydicom/pydicom-data/issues/9
skips="$skips or OBXXXX1A or (test_can_access_unsupported_dataset and (TestPillowHandler_JPEG or TestPillowHandler_JPEG2K))"
# Failures only on ppc64
skips="$skips or test_invalid_arr_dtype_raises or TestHandlerGenerateMultiplex or TestHandlerMultiplexArray"
# Failures only on i586
skips="$skips or test_write_file_id or test_file_id"
skips="$skips or test_write_file_id or test_file_id or test_encapsulate_bot_large_raises or (TestPillowHandler_JPEG2K and test_array)"
# The ignores cause failure during test collection
%{pytest -rs pydicom/tests \
--ignore pydicom/tests/test_JPEG_LS_transfer_syntax.py \
--ignore pydicom/tests/test_dataset.py \
--ignore pydicom/tests/test_gdcm_pixel_data.py \
--ignore pydicom/tests/test_jpeg_ls_pixel_data.py \
--ignore pydicom/tests/test_JPEG_LS_transfer_syntax.py \
--ignore pydicom/tests/test_jpeg_ls_pixel_data.py \
--ignore pydicom/tests/test_numpy_pixel_data.py \
-k "not ($skips)"
}
# see https://github.com/pydicom/pydicom/issues/1697
ignores="--ignore pydicom/tests/test_dataset.py --ignore pydicom/tests/test_data_manager.py"
%pytest -rs pydicom/tests $ignores -k "not ($skips)"
%post
%python_install_alternative pydicom