diff options
author | hut <hut@lavabit.com> | 2010-02-18 13:06:02 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-03-09 14:40:21 +0100 |
commit | 3f388ce51c55b242e46824808c858aa28ece5ce2 (patch) | |
tree | 1b69fac2a1dff1b08e3efbbe1ba5fad45f664ee4 | |
parent | 228f3f571f571b93065210ca5db930beb9731b20 (diff) | |
download | ranger-3f388ce51c55b242e46824808c858aa28ece5ce2.tar.gz |
keyparser: minor updates
-rw-r--r-- | test/tc_newkeys.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/tc_newkeys.py b/test/tc_newkeys.py index cd9430db..aca6ba98 100644 --- a/test/tc_newkeys.py +++ b/test/tc_newkeys.py @@ -197,6 +197,12 @@ for char in ascii_lowercase: key_map['c-' + char] = ord(char) - 96 def translate_keys(obj): + """ + Translate a keybinding to a sequence of integers + + Example: + lol<CR> => (108, 111, 108, 10) + """ assert isinstance(obj, (tuple, int, str)) if isinstance(obj, tuple): for char in obj: @@ -480,7 +486,7 @@ class Test(PressTestCase): u = Tree() u.set('aaaX', 0) u.set('bbbC', 'Yes') - u.set('bbbD', 14) + u.set('bbbD', None) u.set('bbbE', 15) u.set('bbbF', 16) u.set('bQ', 22) @@ -510,7 +516,7 @@ class Test(PressTestCase): self.assertEqual(3, v['aaaZ']) self.assertEqual(11, v['bbbA']) self.assertEqual('Yes', v['bbbC']) - self.assertEqual(14, v['bbbD']) + self.assertEqual(None, v['bbbD']) self.assertEqual(15, v['bbbE']) self.assertEqual(16, v['bbbF']) self.assertRaises(KeyError, t.__getitem__, 'bbbG') |