asdf
asdf copied to clipboard
pytest plugin failed to catch a round-trip bug
The ndarray-1.0.0 schema includes the following example:
- An inline structured array, where the types of each column are
automatically detected
- |
!core/ndarray-1.0.0
[[M110, 110, 205, And],
[ M31, 31, 224, And],
[ M32, 32, 221, And],
[M103, 103, 581, Cas]]
This example doesn't actually round-trip correctly; when the array is written back out, the integers are all converted to string:
array: !core/ndarray-1.0.0
data:
- [M110, '110', '205', And]
- [M31, '31', '224', And]
- [M32, '32', '221', And]
- [M103, '103', '581', Cas]
datatype: [ucs4, 4]
shape: [4, 4]
but the pytest plugin that tests the example doesn't complain. Perhaps there is something we can do to make it more strict?