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.

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

5555 return scalar_array_eq(self, other)
5656
5757 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)
5959
6060 def _decode_impl(self, data, pos, endianness, _):
6161 self[:], size = decode_scalar_array(self._TYPE, data, pos, endianness, len(self))
131131 return composite_array_eq(self, other)
132132
133133 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)
135135
136136 def _decode_impl(self, data, pos, endianness, _):
137137 cursor = 0

The check that tells the two apart

failpass·prophy/tests/test_array_fixed.py::test_fixed_array_with_enum
failpass·prophy/tests/test_array_fixed.py::test_fixed_composite_array_encode
failpass·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.