(self)
| 3519 | class SideEffectNumPyQuicksort(common.PyTablesTestCase): |
| 3520 | |
| 3521 | def test01(self): |
| 3522 | bug_file = common.test_filename("bug-idx.h5") |
| 3523 | tmp_file = tempfile.mktemp(".h5") |
| 3524 | tb.copy_file(bug_file, tmp_file) |
| 3525 | h5 = tb.open_file(tmp_file, "a") |
| 3526 | o = h5.root.table |
| 3527 | vals = o.cols.path[:] |
| 3528 | npvals = set(np.where(vals == 6)[0]) |
| 3529 | |
| 3530 | # Setting the chunkshape is critical for reproducing the bug |
| 3531 | t = o.copy(newname="table2", chunkshape=2730) |
| 3532 | t.cols.path.create_index() |
| 3533 | indexed = {r.nrow for r in t.where("path == 6")} |
| 3534 | |
| 3535 | if common.verbose: |
| 3536 | diffs = sorted(npvals - indexed) |
| 3537 | print("ndiff:", len(diffs), diffs) |
| 3538 | self.assertEqual(len(npvals), len(indexed)) |
| 3539 | |
| 3540 | h5.close() |
| 3541 | if Path(tmp_file).is_file(): |
| 3542 | Path(tmp_file).unlink() |
| 3543 | |
| 3544 | |
| 3545 | # ----------------------------- |
nothing calls this directly
no test coverage detected