fix test typos
This commit is contained in:
parent
1eba1c7196
commit
de72cfef04
|
@ -10,21 +10,21 @@ class TestBytes(TestCase):
|
||||||
from math import ceil
|
from math import ceil
|
||||||
test_ints = [0]
|
test_ints = [0]
|
||||||
test_str = ["0"]
|
test_str = ["0"]
|
||||||
test_bytes = [b'\x00']
|
test_bytes = [b'0']
|
||||||
test_bytearray = [bytearray(b'\x00')]
|
test_bytearray = []
|
||||||
test_list_of_Bits = [[Bits(0)]]
|
test_list_of_Bits = []
|
||||||
test_list_of_Bit = [[Bit(0)] * 8]
|
test_list_of_Bit = []
|
||||||
test_list_of_bool = [[False] * 8]
|
test_list_of_bool = []
|
||||||
test_list_of_bytes = [[b'\x00']]
|
test_list_of_bytes = []
|
||||||
test_list_of_ints = [[0]]
|
test_list_of_ints = []
|
||||||
test_list_of_str = [["0"] * 8]
|
test_list_of_str = []
|
||||||
for i in range(0, 100):
|
for i in range(0, 100):
|
||||||
max_value = int("9" * randint(1, 25))
|
max_value = int("9" * randint(1, 25))
|
||||||
test_value = randint(1, max_value)
|
test_value = randint(1, max_value)
|
||||||
bitesize = ceil(test_value.bit_length() / 8)
|
bitesize = ceil(test_value.bit_length() / 8)
|
||||||
pad_bits = "0" * ((bitesize * 8) - test_value.bit_length())
|
pad_bits = "0" * ((bitesize * 8) - test_value.bit_length())
|
||||||
test_ints.append(test_value)
|
test_ints.append(test_value)
|
||||||
test_str.append(pad_bits + bin(i)[2:])
|
test_str.append(pad_bits + bin(test_value)[2:])
|
||||||
test_bytes.append(test_value.to_bytes(bitesize, "big"))
|
test_bytes.append(test_value.to_bytes(bitesize, "big"))
|
||||||
for bites in test_bytes:
|
for bites in test_bytes:
|
||||||
list_of_Bits = []
|
list_of_Bits = []
|
||||||
|
|
Loading…
Reference in New Issue