Esempio n. 1
0
 def test_split_preserves_commas(self):
     test_val = 'on_next_match: n, m, l'
     k, v = keyboard.split_left_colon(test_val)
     self.assertEquals(2, test_val.count(','))
Esempio n. 2
0
 def test_colon_binding(self):
     test_val = 'on_next_match: :'
     k, v = keyboard.split_left_colon(test_val)
     self.assertEquals(' :', v)
Esempio n. 3
0
 def test_split_with_extra_spaces(self):
     test_val = '  on_next_match: n  '
     k, v = keyboard.split_left_colon(test_val)
     k2, v2 = test_val.strip().split(':')
     self.assertEquals(k, k2)
     self.assertEquals(v, v2)