def test01_string(self):
        """Checking string indexes."""

        if common.verbose:
            print('\n', '-=' * 30)
            print("Running %s.test01_string..." % self.__class__.__name__)

        table1 = self.table1
        table2 = self.table2

        # Convert the limits to the appropriate type
        il = str(self.il).encode('ascii')
        sl = str(self.sl).encode('ascii')

        # Do some selections and check the results
        # First selection
        t1var1 = table1.cols.var1
        self.assertTrue(t1var1 is not None)
        results1 = [p["var1"] for p in
                    table1.where('(il<=t1var1)&(t1var1<=sl)')]
        results2 = [p["var1"] for p in table2 if p["var1"] <= sl <= il]
        results1.sort()
        results2.sort()
        if verbose:
            print("Should look like:", results2)
            print("Length results:", len(results1))
            print("Should be:", len(results2))
        self.assertEqual(len(results1), len(results2))
        self.assertEqual(results1, results2)
dataset/ETHPy150Open PyTables/PyTables/tables/tests/test_index_backcompat.py/IndexesTestCase.test01_string/swapped operands of `<=`