Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
eerimoq committed Oct 14, 2017
1 parent bd8fe46 commit e715524
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion bitstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ def __init__(self, fmt):
if info[0] != 'p':
self._number_of_arguments += 1


def pack(self, *args):
"""Return a byte string containing the values v1, v2, ... packed
according to the compiled format. If the total number of bits
Expand Down
6 changes: 3 additions & 3 deletions tests/test_bitstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,12 @@ def test_performance_integers(self):
print("unpack time compiled: {} s ({} s/unpack)".format(time, time / 50000))

def test_compile(self):
compiled_format = bitstruct.compile('u1u1s6u7u9')
cf = bitstruct.compile('u1u1s6u7u9')

packed = compiled_format.pack(0, 0, -2, 65, 22)
packed = cf.pack(0, 0, -2, 65, 22)
self.assertEqual(packed, b'\x3e\x82\x16')

unpacked = compiled_format.unpack(b'\x3e\x82\x16')
unpacked = cf.unpack(b'\x3e\x82\x16')
self.assertEqual(unpacked, (0, 0, -2, 65, 22))


Expand Down

0 comments on commit e715524

Please sign in to comment.