summary refs log tree commit diff stats
path: root/test/tc_commandlist.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/tc_commandlist.py')
-rw-r--r--test/tc_commandlist.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/tc_commandlist.py b/test/tc_commandlist.py
index 5062be9f..f1edfa20 100644
--- a/test/tc_commandlist.py
+++ b/test/tc_commandlist.py
@@ -10,6 +10,7 @@ class Test(TestCase):
 	def test_commandist(self):
 		cl = CL()
 		fnc = lambda arg: 1
+		fnc2 = lambda arg: 2
 		dmy = cl.dummy_object
 
 		cl.bind(fnc, 'aaaa')
@@ -51,14 +52,24 @@ class Test(TestCase):
 		self.assertEqual(dmy, cl['aaa'])
 		self.assertEqual(fnc, cl['aaaa'].execute)
 
+		# ------------------------ test aliases
 		cl.alias('aaaa', 'c')
 		cl.rebuild_paths()
-		self.assertEqual(cl['c'], cl['aaaa'])
+
+		self.assertEqual(cl['c'].execute, cl['aaaa'].execute)
+
+		cl.bind(fnc2, 'aaaa')
+		cl.rebuild_paths()
+
+		self.assertEqual(cl['c'].execute, cl['aaaa'].execute)
+
 		cl.unbind('c')
 		cl.rebuild_paths()
-		self.assertEqual(fnc, cl['aaaa'].execute)
+
+		self.assertEqual(fnc2, cl['aaaa'].execute)
 		self.assertKeyError(cl, 'c')
 
+		# ----------------------- test clearing
 		cl.clear()
 		self.assertKeyError(cl, 'a')
 		self.assertKeyError(cl, 'aa')