def test02b_whereAppend(self):
        """Searching nested data and appending it to another table."""

        tbl1 = self.h5file.create_table(
            '/', 'test1', self._TestTDescr, title=self._getMethodName())
        tbl1.append(self._testAData)
        tbl1.flush()

        tbl2 = self.h5file.create_table(
            '/', 'test2', self._TestTDescr, title=self._getMethodName())
        tbl1.append_where(
            tbl2, self._testCondition, self._testCondVars(tbl1))

        if self.reopen:
            self._reopen()
            tbl1 = self.h5file.root.test1
            tbl2 = self.h5file.root.test2

        searchedCoords = tbl2.get_where_list(
            self._testCondition, self._testCondVars(tbl2))

        # All but the last row match the condition.
        searchedCoords.sort()
        self.assertEqual(searchedCoords.tolist(),
                         list(range(len(self._testAData) - 1)),
                         "Search returned incorrect results.")
dataset/ETHPy150Open PyTables/PyTables/tables/tests/test_nestedtypes.py/WriteTestCase.test02b_whereAppend/original