summary refs log tree commit diff stats
path: root/CHANGELOG
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2013-08-17 13:54:30 +0200
committerhut <hut@lepus.uberspace.de>2013-08-17 13:54:30 +0200
commitf0919e87cad6d071cbae74813bd7c892224e8b99 (patch)
tree13a2ab6d52349ce5bacfe733beb79625d2fdceb4 /CHANGELOG
parent8a098da9f1e1fa62ddb6f629e50526686d3c1bbb (diff)
downloadranger-f0919e87cad6d071cbae74813bd7c892224e8b99.tar.gz
core.actions: better numerical argument to "mark_files"
Diffstat (limited to 'CHANGELOG')
0 files changed, 0 insertions, 0 deletions
a> 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50


















                                                            
                                                         






                                         






















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

import unittest
import curses

from ranger.gui import ui

from test import Fake, OK, raise_ok

ui.curses = Fake()

class Test(unittest.TestCase):
	def setUp(self):

		self.fm = Fake()
		self.ui = ui.UI(env=Fake(), fm=self.fm)

		def fakesetup():
			self.ui.widget = Fake()
			self.ui.add_child(self.ui.widget)
		self.ui.setup = fakesetup

		self.ui.initialize()

	def tearDown(self):
		self.ui.destroy()
	
	def test_passing(self):
		# Test whether certain method calls are passed to widgets
		widget = self.ui.widget

		widget.draw = raise_ok
		self.assertRaises(OK, self.ui.draw)
		widget.__clear__()

		widget.finalize = raise_ok
		self.assertRaises(OK, self.ui.finalize)
		widget.__clear__()

		widget.press = raise_ok
		random_key = 123
		self.assertRaises(OK, self.ui.handle_key, random_key)
		widget.__clear__()

		widget.destroy = raise_ok
		self.assertRaises(OK, self.ui.destroy)
		widget.__clear__()

if __name__ == '__main__':
	unittest.main()