MCPcopy Create free account
hub / github.com/PyTables/PyTables / test00_same

Method test00_same

tables/tests/test_tables.py:6791–6812  ·  view source on GitHub ↗

Query with same storage.

(self)

Source from the content-addressed store, hash-verified

6789 tbl.flush()
6790
6791 def test00_same(self):
6792 """Query with same storage."""
6793
6794 DstTblDesc = self.SrcTblDesc
6795
6796 tbl1 = self.h5file.root.test
6797 tbl2 = self.h5file.create_table("/", "test2", DstTblDesc)
6798
6799 tbl1.append_where(tbl2, "id > 1")
6800
6801 # Rows resulting from the query are those in the new table.
6802 it2 = iter(tbl2)
6803 for r1 in tbl1.where("id > 1"):
6804 r2 = next(it2)
6805 self.assertTrue(
6806 r1["id"] == r2["id"]
6807 and r1["v1"] == r2["v1"]
6808 and r1["v2"] == r2["v2"]
6809 )
6810
6811 # There are no more rows.
6812 self.assertRaises(StopIteration, next, it2)
6813
6814 def test01_compatible(self):
6815 """Query with compatible storage."""

Callers

nothing calls this directly

Calls 3

append_whereMethod · 0.80
whereMethod · 0.80
create_tableMethod · 0.45

Tested by

no test coverage detected