Checking get_where_list & itersequence (numpy bool limits & flavor)
(self)
| 967 | self.assertEqual(results1, results2) |
| 968 | |
| 969 | def test06b(self): |
| 970 | """Checking get_where_list & itersequence (numpy bool limits & |
| 971 | flavor)""" |
| 972 | |
| 973 | if common.verbose: |
| 974 | print("\n", "-=" * 30) |
| 975 | print("Running %s.test06b..." % self.__class__.__name__) |
| 976 | |
| 977 | table1 = self.h5file.root.table1 |
| 978 | table2 = self.h5file.root.table2 |
| 979 | |
| 980 | # Do some selections and check the results |
| 981 | t1var2 = table1.cols.var2 |
| 982 | false = np.bool_(False) |
| 983 | self.assertFalse(false) # silence pyflakes |
| 984 | condition = "t1var2==false" |
| 985 | self.assertTrue( |
| 986 | table1.will_query_use_indexing(condition) |
| 987 | == fzset([t1var2.pathname]) |
| 988 | ) |
| 989 | table1.flavor = "python" |
| 990 | rowList1 = table1.get_where_list(condition) |
| 991 | results1 = [p["var2"] for p in table1.itersequence(rowList1)] |
| 992 | results2 = [p["var2"] for p in table2 if p["var2"] is False] |
| 993 | if common.verbose: |
| 994 | print("Length results:", len(results1)) |
| 995 | print("Should be:", len(results2)) |
| 996 | self.assertEqual(len(results1), len(results2)) |
| 997 | self.assertEqual(results1, results2) |
| 998 | |
| 999 | def test07a(self): |
| 1000 | """Checking get_where_list & itersequence (int flavor)""" |
nothing calls this directly
no test coverage detected