test: compare h5py's v1 compound field names with what clawhdf5 reads
The test compared h5py against its own expected table, so it passed with the fix reverted. Found by the adversarial review. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
@@ -107,8 +107,12 @@ with h5py.File("{path}", "r") as f:
|
||||
);
|
||||
let stdout = String::from_utf8_lossy(&out.stdout);
|
||||
let theirs: Vec<&str> = stdout.lines().collect();
|
||||
// Read the types through clawhdf5, not from `expected()`, so this checks
|
||||
// our reader against libhdf5 rather than the table against h5py.
|
||||
let file = File::from_bytes(FIXTURE.to_vec()).unwrap();
|
||||
let ours: Vec<String> = expected()
|
||||
.into_iter()
|
||||
.map(|(p, _)| (p, file.dataset(p).unwrap().dtype().unwrap()))
|
||||
.map(|(p, t)| match t {
|
||||
DType::Compound(fields) => {
|
||||
let names: Vec<String> = fields.into_iter().map(|(n, _)| n).collect();
|
||||
|
||||
Reference in New Issue
Block a user