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

        (append)

        """

        if self.close:
            self._reopen(mode='a')
        table = self.h5file.root.table
        row = table.row
        for i in range(50):
            row["color"] = "a  "   # note the trailing spaces
            row.append()
        table.flush()
        if self.close:
            self.h5file.close()
            self.h5file = tables.open_file(self.h5fname, "a")
        data = self.h5file.root.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), 150)

        # Finally, check that the contents are ok
        for i in range(150):
            idata = data['color'][i]
            if 100 < i:
                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.test09c_getStrings/swapped operands of `<`