def test_2frame_1sample(self):
     """Test reshaping 2 frame, 1 sample/pixel."""
     self.elem['NumberOfFramesInOverlay'] = 2
     arr = reshape_overlay_array(self.elem,
                                 RESHAPE_ARRAYS['2frame_1sample'])
     assert (2, 4, 5) == arr.shape
     assert np.array_equal(arr, self.ref_2_1)
 def test_invalid_nr_frames_raises(self):
     """Test an invalid Number of Frames value raises exception."""
     self.elem['NumberOfFramesInOverlay'] = 0
     # Need to escape brackets
     with pytest.raises(ValueError, match=r"value of 0 for \(60xx,0015\)"):
         reshape_overlay_array(self.elem, RESHAPE_ARRAYS['1frame_1sample'])
def test_reshape_pixel_array_raises():
    """Test that reshape_overlay_array raises exception without numpy."""
    with pytest.raises(ImportError, match="Numpy is required to reshape"):
        reshape_overlay_array(None, None)