[pyrepl-checkins] r5438 - in pyrepl/branch/pyrepl-rework-n: pyrepl test/unit

mwh at codespeak.net mwh at codespeak.net
Mon Jul 5 16:29:15 MEST 2004


Author: mwh
Date: Mon Jul  5 16:29:15 2004
New Revision: 5438

Modified:
   pyrepl/branch/pyrepl-rework-n/pyrepl/keymap.py
   pyrepl/branch/pyrepl-rework-n/test/unit/test_statemachines.py
Log:
fix a test
i'm still not quite happy about the handling of named keystrokes


Modified: pyrepl/branch/pyrepl-rework-n/pyrepl/keymap.py
==============================================================================
--- pyrepl/branch/pyrepl-rework-n/pyrepl/keymap.py	(original)
+++ pyrepl/branch/pyrepl-rework-n/pyrepl/keymap.py	Mon Jul  5 16:29:15 2004
@@ -120,7 +120,7 @@
                     raise KeySpecError, \
                               "unrecognised keyname `%s' at char %d of %s"%(
                         ret, s + 2, repr(key))
-                #ret = _keynames[ret]
+                ret = keys.translate(ret)
                 s = t + 1
             else:
                 raise KeySpecError, \

Modified: pyrepl/branch/pyrepl-rework-n/test/unit/test_statemachines.py
==============================================================================
--- pyrepl/branch/pyrepl-rework-n/test/unit/test_statemachines.py	(original)
+++ pyrepl/branch/pyrepl-rework-n/test/unit/test_statemachines.py	Mon Jul  5 16:29:15 2004
@@ -6,8 +6,8 @@
     def translate(self, key):
         return key
     def all_keys(self):
-        return [('abc', 'a'),
-                ('abd', 'b')]
+        return [('abc', 'abc'),
+                ('abd', 'abd')]
     def keynames(self):
         return ['abc', 'abd']
 
@@ -37,6 +37,5 @@
     u.push_and_go('c')
 
     v = c.get()
-    print v
-    assert v == Command('keynamed-a', [Keystroke('abc', 'a')])
+    assert v == Command('keynamed-a', [Keystroke('abc', u'abc')])
     


More information about the pyrepl-checkins mailing list