Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix pad wrapping in test
  • Loading branch information
PeterC-DLS committed Jul 22, 2026
commit 1fd4ac4ce4ce1c7dbb83dcd363b32381f309e220
6 changes: 4 additions & 2 deletions test/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ def encode_array(obj: Any, posn: int) -> Any | dict[str, Any]:
else:
offset += 4 # prefix with pad so fixstr + 3 + ?
pad = itemsize - (offset % itemsize)
# use fixstr for padding so deduct one and wrap
pad = (pad - 1) % itemsize
# use fixstr for padding so deduct one
if pad < 2:
pad += itemsize # prewrap as pad cannot be less than one
pad -= 1

if pad:
obj = dict(
Expand Down
Loading