Commit 6289836
committed
test(immutable): assert length snapshot behavior
`ImmutableList` does not store a `_length` attribute; length is derived from
the immutable `_items` tuple. The previous test passed by trying to assign a
nonexistent frozen dataclass field, which did not verify any real length state.
Replace it with a behavior-focused assertion: constructing from a mutable list
takes a tuple snapshot, so later mutations to the source list do not affect
`len()`.
No runtime behavior change; the full tox matrix (lint, mypy strict, unit tests
on Python 3.10-3.14) passes.1 parent 3e38669 commit 6289836
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
0 commit comments