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