import pytest from src.user_interface import UserInterface from src.models import KeypadSize @pytest.mark.parametrize( "keypad_size", [KeypadSize(numb_of_keys=10, attrs_per_key=7)] ) def test_attr_set_idx(keypad_size): user_interface = UserInterface.new(keypad_size) for attr_idx in range(70): user_interface_idx = user_interface.attr_indices[attr_idx] assert (attr_idx % keypad_size.attrs_per_key == user_interface_idx % keypad_size.attrs_per_key)