Open
Description
Hello,
I am using a snapshot of a specific output file to track exact changes when a test fails. The file is sorted to avoid errors based on row/column order. The following is used to generate a snapshot:
assert snapshot(path(process.out[0].get(0)).csv().sort()).match()
The resulting snapshot file contains information about the individual rows of an output file:
"rows": [
{
"prior.c": null,
"prior.1": 0.0025,
"bb.selection": "align",
"reg.thresh": null
},
{
"prior.c": 0.001,
"prior.1": null,
"bb.selection": "regional",
"reg.thresh": null
},
{
"prior.c": 1.0E-4,
"prior.1": null,
"bb.selection": "regional",
"reg.thresh": null
},
{
"prior.c": 1.0E-10,
"prior.1": null,
"bb.selection": "regional",
"reg.thresh": null
}
]
When running the test I am getting an error at the row with "prior.c": 1.0E-4
, because at some point it gets converted from scientific notation into a float:
Test [d35e79b4] 'Runs without failures' java.lang.RuntimeException: Different Snapshot:
199c199
< "prior.c": 0.00010,
---
> "prior.c": 1.0E-4
Notably, I haven't observed such behaviour with other powers of 10 in scientific notation. Would it be possbile to add some checks to avoid such conversions? Thanks!
Metadata
Metadata
Assignees
Labels
No labels