fix split shuffle
This commit is contained in:
@@ -5,7 +5,7 @@ from src.models import KeypadSize
|
||||
|
||||
@pytest.fixture()
|
||||
def user_keypad():
|
||||
return UserKeypad.create(keypad_size=KeypadSize(props_per_key=8, numb_of_keys=8))
|
||||
return UserKeypad.create(keypad_size=KeypadSize(props_per_key=5, numb_of_keys=5))
|
||||
|
||||
|
||||
def test_dispersion(user_keypad):
|
||||
@@ -25,8 +25,11 @@ def test_shuffle_props(user_keypad):
|
||||
- the order in which the cipher move from key to key is random (i.e. the distance traveled is uniform)
|
||||
"""
|
||||
pre_shuffle_keypad = user_keypad.keypad.copy()
|
||||
print("")
|
||||
print(user_keypad.keypad_matrix())
|
||||
user_keypad.split_shuffle()
|
||||
post_shuffle_keypad = user_keypad.keypad.copy()
|
||||
print(user_keypad.keypad_matrix())
|
||||
assert (not all(
|
||||
post_shuffle_keypad[idx] == pre_shuffle_keypad[idx] for idx in range(len(post_shuffle_keypad))
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user