Since the initial exploration of soft gamma-ray sky in the 60s, high-energy celestial sources have been mainly characterized through imaging, spectroscopy and timing analysis. Despite tremendous progress in the field, the radiation mechanisms at work in sources such as neutrons stars and black holes are still unclear. The polarization state of the radiation is an observational parameter which brings key additional information about the physical process. This is why most of the projects for the next generation of space missions covering the tens of keV to the MeV region require a polarization measurement capability. A key element enabling this capability is a detector system allowing the identification and characterization of Compton interactions as they are the main process at play. The hard X-ray imaging spectrometer module, developed in CEA with the generic name of Caliste module, is such a detector. In this paper, we present experimental results for two types of Caliste-256 modules, one based on a CdTe crystal, the other one on a CdZnTe crystal, which have been exposed to linearly polarized beams at the European Synchrotron Radiation Facility. These results, obtained at 200-300 keV, demonstrate their capability to give an accurate determination of the polarization parameters (polarization angle and fraction) of the incoming beam. Applying a selection to our data set, equivalent to select 90 degrees Compton scattered interactions in the detector plane, we find a modulation factor Q of 0.78. The polarization angle and fraction are derived with accuracies of approximately 1 degree and 5%. The modulation factor remains larger than 0.4 when essentially no selection is made at all on the data. These results prove that the Caliste-256 modules have performances allowing them to be excellent candidates as detectors with polarimetric capabilities, in particular for future space missions.