Query with less precise storage.
(self)
| 6839 | self.assertRaises(StopIteration, next, it2) |
| 6840 | |
| 6841 | def test02_lessPrecise(self): |
| 6842 | """Query with less precise storage.""" |
| 6843 | |
| 6844 | class DstTblDesc(tb.IsDescription): |
| 6845 | id = tb.IntCol() |
| 6846 | v1 = tb.IntCol() # int, not float |
| 6847 | v2 = tb.StringCol(itemsize=8) |
| 6848 | |
| 6849 | tbl1 = self.h5file.root.test |
| 6850 | tbl2 = self.h5file.create_table("/", "test2", DstTblDesc) |
| 6851 | |
| 6852 | tbl1.append_where(tbl2, "id > 1") |
| 6853 | |
| 6854 | # Rows resulting from the query are those in the new table. |
| 6855 | it2 = iter(tbl2) |
| 6856 | for r1 in tbl1.where("id > 1"): |
| 6857 | r2 = next(it2) |
| 6858 | self.assertTrue( |
| 6859 | r1["id"] == r2["id"] |
| 6860 | and int(r1["v1"]) == r2["v1"] |
| 6861 | and r1["v2"] == r2["v2"] |
| 6862 | ) |
| 6863 | |
| 6864 | # There are no more rows. |
| 6865 | self.assertRaises(StopIteration, next, it2) |
| 6866 | |
| 6867 | def test03_incompatible(self): |
| 6868 | """Query with incompatible storage.""" |
nothing calls this directly
no test coverage detected