def test09b_getStrings(self):
        """Checking the return of string columns with spaces.

        (modify)

        """

        if self.close:
            self._reopen(mode='a')
        table = self.h5file.root.table
        for i in range(50):
            table.cols.color[i] = "a  "
        table.flush()
        data = table[:]
        if common.verbose:
            print("Type of read:", type(data))
            print("Description of the record:", data.dtype.descr)
            print("First 3 elements of read:", data[:3])

        # Check that both NumPy objects are equal
        self.assertTrue(isinstance(data, np.ndarray))

        # Check that all columns have been selected
        self.assertEqual(len(data), 100)

        # Finally, check that the contents are ok
        for i in range(100):
            idata = data['color'][i]
            if i >= 50:
                self.assertEqual(idata, np.array("ab", dtype="|S4"))
            else:
                self.assertEqual(idata, np.array("a  ", dtype="|S4"))
dataset/ETHPy150Open PyTables/PyTables/tables/tests/test_numpy.py/TableNativeFlavorTestCase.test09b_getStrings/original