summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-02-18 13:06:02 +0100
committerhut <hut@lavabit.com>2010-03-09 14:40:21 +0100
commit3f388ce51c55b242e46824808c858aa28ece5ce2 (patch)
tree1b69fac2a1dff1b08e3efbbe1ba5fad45f664ee4 /test
parent228f3f571f571b93065210ca5db930beb9731b20 (diff)
downloadranger-3f388ce51c55b242e46824808c858aa28ece5ce2.tar.gz
keyparser: minor updates
Diffstat (limited to 'test')
-rw-r--r--test/tc_newkeys.py10
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')
017-06-19 21:47:07 -0700 committer Kartik K. Agaram <vc@akkartik.com> 2017-06-19 21:47:07 -0700 3930 - experimental bytecode interpreter' href='/akkartik/mu/commit/subx/build?h=hlt&id=248e789e7cedf9dfab25657d3dfa195d7ad0127b'>248e789e ^
bfadbd4b ^





f898ee7a ^
6e1eeeeb ^
248e789e ^

72f278ae ^
bfadbd4b ^
248e789e ^
bfadbd4b ^
248e789e ^



e1eefb8a ^
248e789e ^
75f2c123 ^



248e789e ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103