Beispiel #1
0
 def test_encoding_42_with_8_bit_prefix(self):
     val = decode_integer(b'\x2a', 8)
     assert val == (42, 1)
Beispiel #2
0
 def test_encoding_1337_with_5_bit_prefix(self):
     val = decode_integer(b'\x1f\x9a\x0a', 5)
     assert val == (1337, 3)
Beispiel #3
0
 def test_decoding_10_with_5_bit_prefix(self):
     val = decode_integer(b'\x0a', 5)
     assert val == (10, 1)
Beispiel #4
0
 def test_encoding_42_with_8_bit_prefix(self):
     val = decode_integer(b'\x2a', 8)
     assert val == (42, 1)
Beispiel #5
0
 def test_encoding_1337_with_5_bit_prefix(self):
     val = decode_integer(b'\x1f\x9a\x0a', 5)
     assert val == (1337, 3)
Beispiel #6
0
 def test_decoding_10_with_5_bit_prefix(self):
     val = decode_integer(b'\x0a', 5)
     assert val == (10, 1)