From 705eabe249d07dd569ea4c5b6af134a718a65db0 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 12 Feb 2010 20:33:01 +0100 Subject: keyparser: minor changes --- test/tc_newkeys.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/tc_newkeys.py b/test/tc_newkeys.py index d5c4e18f..d29450d9 100644 --- a/test/tc_newkeys.py +++ b/test/tc_newkeys.py @@ -273,7 +273,7 @@ class Tree(object): last_tree = tree tree = newtree if isinstance(tree, dict): - return Tree(tree, parent=last_tree, key=char) + return type(self)(tree, parent=last_tree, key=char) else: return tree @@ -291,7 +291,7 @@ class Tree(object): except KeyError: raise KeyError(str(char) + " not in tree " + str(tree)) if isinstance(tree, dict): - return Tree(tree, parent=last_tree, key=char) + return type(self)(tree, parent=last_tree, key=char) else: return tree @@ -342,7 +342,6 @@ class Binding(object): except KeyError: self.direction = None - class PressTestCase(TestCase): """Some useful methods for the actual test""" def _mkpress(self, keybuffer, keymap): @@ -398,6 +397,9 @@ class Test(PressTestCase): test('<') test('>') test('', 1) + test('', 2) + for i in range(1, 26): + test('', i) test('k') test('k') -- cgit 1.4.1-2-gfad0