コード例 #1
0
 def test_parse_hotkey_combinations_fail_empty(self):
     with self.assertRaises(ValueError):
         keyboard.parse_hotkey_combinations('')
コード例 #2
0
 def test_parse_hotkey_combinations_multi_modifier(self):
     self.assertEqual(keyboard.parse_hotkey_combinations('shift+a, b'),
                      (((1, 5), (1, 6)), ((2, ), )))
コード例 #3
0
 def test_parse_hotkey_combinations_list_list(self):
     self.assertEqual(
         keyboard.parse_hotkey_combinations(
             keyboard.parse_hotkey_combinations('a, b')),
         keyboard.parse_hotkey_combinations('a, b'))
コード例 #4
0
 def test_parse_hotkey_combinations_single_modifiers(self):
     self.assertEqual(keyboard.parse_hotkey_combinations('shift+ctrl+a'),
                      (((1, 5, 7), (1, 6, 7)), ))
コード例 #5
0
 def test_parse_hotkey_combinations_multi(self):
     self.assertEqual(keyboard.parse_hotkey_combinations('a, b'),
                      (((1, ), ), ((2, ), )))
コード例 #6
0
 def test_parse_hotkey_combinations_scan_code(self):
     self.assertEqual(keyboard.parse_hotkey_combinations(30),
                      (((30, ), ), ))
コード例 #7
0
 def test_parse_hotkey_combinations_single(self):
     self.assertEqual(keyboard.parse_hotkey_combinations('a'),
                      (((1, ), ), ))
コード例 #8
0
ファイル: _keyboard_tests.py プロジェクト: boppreh/keyboard
 def test_parse_hotkey_combinations_list_list(self):
     self.assertEqual(keyboard.parse_hotkey_combinations(keyboard.parse_hotkey_combinations('a, b')), keyboard.parse_hotkey_combinations('a, b'))
コード例 #9
0
ファイル: _keyboard_tests.py プロジェクト: boppreh/keyboard
 def test_parse_hotkey_combinations_fail_empty(self):
     with self.assertRaises(ValueError):
         keyboard.parse_hotkey_combinations('')
コード例 #10
0
ファイル: _keyboard_tests.py プロジェクト: boppreh/keyboard
 def test_parse_hotkey_combinations_multi_modifier(self):
     self.assertEqual(keyboard.parse_hotkey_combinations('shift+a, b'), (((1, 5), (1, 6)), ((2,),)))
コード例 #11
0
ファイル: _keyboard_tests.py プロジェクト: boppreh/keyboard
 def test_parse_hotkey_combinations_multi(self):
     self.assertEqual(keyboard.parse_hotkey_combinations('a, b'), (((1,),), ((2,),)))
コード例 #12
0
ファイル: _keyboard_tests.py プロジェクト: boppreh/keyboard
 def test_parse_hotkey_combinations_single_modifiers(self):
     self.assertEqual(keyboard.parse_hotkey_combinations('shift+ctrl+a'), (((1, 5, 7), (1, 6, 7)),))
コード例 #13
0
ファイル: _keyboard_tests.py プロジェクト: boppreh/keyboard
 def test_parse_hotkey_combinations_single(self):
     self.assertEqual(keyboard.parse_hotkey_combinations('a'), (((1,),),))
コード例 #14
0
ファイル: _keyboard_tests.py プロジェクト: boppreh/keyboard
 def test_parse_hotkey_combinations_scan_code(self):
     self.assertEqual(keyboard.parse_hotkey_combinations(30), (((30,),),))