Whole file
aurzenligl/prophy
The author described this change as “In test_array_fixed - fix metaclass + use only marked bytestring”. It counts as a record because the checks below fail on the code as it stood at de3613882 and pass on d9f4b6d2f, with nothing else changed between the two runs.
Projectaurzenligl/prophy
Fix saved2014-09-25
Sharing licenceMIT · LICENSE
Change size+2 −2
What the code was meant to do, written into the code itself as a save note
In test_array_fixed - fix metaclass + use only marked bytestring
The change
| 55 | 55 | return scalar_array_eq(self, other) | |
| 56 | 56 | ||
| 57 | 57 | def _encode_impl(self, endianness): | |
| 58 | - | return "".join(self._TYPE._encode(value, endianness) for value in self) | |
| 58 | + | return b"".join(self._TYPE._encode(value, endianness) for value in self) | |
| 59 | 59 | ||
| 60 | 60 | def _decode_impl(self, data, pos, endianness, _): | |
| 61 | 61 | self[:], size = decode_scalar_array(self._TYPE, data, pos, endianness, len(self)) | |
| ⋯ | |||
| 131 | 131 | return composite_array_eq(self, other) | |
| 132 | 132 | ||
| 133 | 133 | def _encode_impl(self, endianness): | |
| 134 | - | return "".join(value.encode(endianness, terminal = False) for value in self) | |
| 134 | + | return b"".join(value.encode(endianness, terminal = False) for value in self) | |
| 135 | 135 | ||
| 136 | 136 | def _decode_impl(self, data, pos, endianness, _): | |
| 137 | 137 | cursor = 0 | |
The check that tells the two apart
fail→pass·prophy/tests/test_array_fixed.py::test_fixed_array_with_enum
fail→pass·prophy/tests/test_array_fixed.py::test_fixed_composite_array_encode
fail→pass·prophy/tests/test_array_fixed.py::test_fixed_scalar_array_encode
Check file prophy/tests/test_array_fixed.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before itde36138820a26cc2830dcd34bc74834b32357859
Broken version dated2014-09-25
Moduleprophy.container
Units changedfixed_composite_array, fixed_scalar_array
Fingerprint6d544f873c0ea6fc
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.