Пример #1
0
 def write(something="TrAiNeR"):
     """
     Uses a planning algorithm to type out a word in the most efficient way
     possible.
     """
     button_sequence = keyboard.plan_typing(something)
     crystal.keyboard_apply([[x] for x in button_sequence])
Пример #2
0
    def test_very_basic(self):
        button_sequence = keyboard.plan_typing("an")
        expected_result = ["select", "a", "d", "r", "r", "r", "r", "a"]

        self.assertEqual(len(expected_result), len(button_sequence))
        self.assertEqual(expected_result, button_sequence)