def METHOD_NAME(self, kw):
    hdu = fits.CompImageHDU(np.ones((10, 10)))
    hdu._header[kw] = -1
    with pytest.raises(ValueError) as exc:
        compress_image_data(
            hdu.data, hdu.compression_type, hdu._header, hdu.columns
        )
    assert f"{kw} should not be negative." in str(exc.value)