Commit a0933bc
committed
Test Constants.copy() preserves subclass type
copy() is deepcopy-based (restored via __getstate__/__setstate__, not
by re-invoking type(self)(...)), so a naive reimplementation could
silently downgrade a subclass instance to plain Constants with no
existing test catching it.
Found in review of #282.1 parent 310a793 commit a0933bc
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
986 | 986 | | |
987 | 987 | | |
988 | 988 | | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
989 | 1000 | | |
990 | 1001 | | |
991 | 1002 | | |
| |||
0 commit comments