Skip to content

Commit

Permalink
Merge pull request #23 from EdwardBetts/patch-1
Browse files Browse the repository at this point in the history
Fix tests so they work on big-endian architectures
  • Loading branch information
synesthesiam authored Jan 13, 2025
2 parents 6d3092e + a6897ec commit 7801717
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_pyaudioop.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import sys

from voip_utils import pyaudioop

byteorder = "little"

def pack(width, data):
return b"".join(v.to_bytes(width, sys.byteorder, signed=True) for v in data)
return b"".join(v.to_bytes(width, byteorder, signed=True) for v in data)


def unpack(width, data):
return [
int.from_bytes(data[i : i + width], sys.byteorder, signed=True)
int.from_bytes(data[i : i + width], byteorder, signed=True)
for i in range(0, len(data), width)
]

Expand Down

0 comments on commit 7801717

Please sign in to comment.