Commit 20f7ec2
test: lock down WeakDataset / ShearYX2DIrregular json round-trip
Regression test for the failure mode that surfaced in PR #525 — al.from_json
on a serialised WeakDataset previously crashed with:
TypeError: VectorYX2DIrregular.__init__() missing 1 required
positional argument: 'values'
The library-side fix lives in PyAutoArray (a `values` property on
VectorYX2DIrregular). This test asserts the full simulator → write → load
path, including subclass preservation — loaded.shear_yx returns as
ShearYX2DIrregular, not the base class — plus matching shear values, grid
positions, and noise map.
Refs issue #554.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 01c4457 commit 20f7ec2
1 file changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
0 commit comments