fix test typos

This commit is contained in:
S Groesz 2020-10-16 06:28:51 +00:00
parent 1eba1c7196
commit de72cfef04
1 changed files with 9 additions and 9 deletions

View File

@ -10,21 +10,21 @@ class TestBytes(TestCase):
from math import ceil
test_ints = [0]
test_str = ["0"]
test_bytes = [b'\x00']
test_bytearray = [bytearray(b'\x00')]
test_list_of_Bits = [[Bits(0)]]
test_list_of_Bit = [[Bit(0)] * 8]
test_list_of_bool = [[False] * 8]
test_list_of_bytes = [[b'\x00']]
test_list_of_ints = [[0]]
test_list_of_str = [["0"] * 8]
test_bytes = [b'0']
test_bytearray = []
test_list_of_Bits = []
test_list_of_Bit = []
test_list_of_bool = []
test_list_of_bytes = []
test_list_of_ints = []
test_list_of_str = []
for i in range(0, 100):
max_value = int("9" * randint(1, 25))
test_value = randint(1, max_value)
bitesize = ceil(test_value.bit_length() / 8)
pad_bits = "0" * ((bitesize * 8) - test_value.bit_length())
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"))
for bites in test_bytes:
list_of_Bits = []