about summary refs log tree commit diff stats
path: root/cpp/enumerate
Commit message (Expand)AuthorAgeFilesLines
* 1199 - ignore errors in 'make clean'Kartik K. Agaram2015-04-251-1/+1
* 1014 - reorganize build system to prepare for .mu layersKartik K. Agaram2015-04-032-0/+40
er hut <hut@lavabit.com> 2009-12-27 23:41:04 +0100 test case for keyapi.Wrapper' href='/akspecs/ranger/commit/test/tc_keyapi.py?h=v1.9.0b1&id=a666f32b959416d062ac38645dc27f20686d881b'>a666f32b ^
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













                                                                            
                                             







                                                                  
if __name__ == '__main__': from __init__ import init; init()

from unittest import TestCase, main

class Test(TestCase):
	def test_wrapper(self):
		from ranger.keyapi import Wrapper

		class dummyfm(object):
			def move(relative):
				return "I move down by {0}".format(relative)

		class commandarg(object):
			def __init__(self):
				self.fm = dummyfm
				self.n = None

		arg = commandarg()

		do = Wrapper('fm')
		command = do.move(relative=4)

		self.assertEqual(command(arg), 'I move down by 4')

if __name__ == '__main__': main()