summary refs log tree commit diff stats
path: root/test/tc_displayable.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-31 19:13:08 +0100
committerhut <hut@lavabit.com>2009-12-31 19:13:08 +0100
commitf7819821c71a687a28319d60bb73083b1abd0138 (patch)
tree20bca3cb2000f59c138e22fac8276afc4505fe2b /test/tc_displayable.py
parent42fd36907c9d9e4c68634e35e7b5de2c91c9164e (diff)
downloadranger-f7819821c71a687a28319d60bb73083b1abd0138.tar.gz
fixed tc_displayable
Diffstat (limited to 'test/tc_displayable.py')
-rw-r--r--test/tc_displayable.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/test/tc_displayable.py b/test/tc_displayable.py
index d7466809..493b0ef8 100644
--- a/test/tc_displayable.py
+++ b/test/tc_displayable.py
@@ -4,8 +4,7 @@ import unittest
 import curses
 from random import randint
 
-from ranger.gui.displayable import\
-		Displayable, DisplayableContainer, OutOfBoundsException
+from ranger.gui.displayable import Displayable, DisplayableContainer
 from test import Fake, OK, raise_ok
 
 class TestDisplayable(unittest.TestCase):
@@ -38,10 +37,10 @@ class TestDisplayable(unittest.TestCase):
 		disp = self.disp
 		hei, wid = self.env.termsize
 
-		self.assertRaises(OutOfBoundsException, disp.resize, 0, 0, hei + 1, wid)
-		self.assertRaises(OutOfBoundsException, disp.resize, 0, 0, hei, wid + 1)
-		self.assertRaises(OutOfBoundsException, disp.resize, -1, 0, hei, wid)
-		self.assertRaises(OutOfBoundsException, disp.resize, 0, -1, hei, wid)
+		self.assertRaises(ValueError, disp.resize, 0, 0, hei + 1, wid)
+		self.assertRaises(ValueError, disp.resize, 0, 0, hei, wid + 1)
+		self.assertRaises(ValueError, disp.resize, -1, 0, hei, wid)
+		self.assertRaises(ValueError, disp.resize, 0, -1, hei, wid)
 
 		box = (randint(10, 20), randint(30, 40), \
 				randint(30, 40), randint(10, 20))
@@ -103,11 +102,14 @@ class TestDisplayableContainer(unittest.TestCase):
 	def test_focused_object(self):
 		d1 = Displayable(**self.initdict)
 		d2 = DisplayableContainer(**self.initdict)
-		d2.add_child(*[Displayable(**self.initdict) for x in range(5)])
+		for obj in (Displayable(**self.initdict) for x in range(5)):
+			d2.add_child(obj)
 		d3 = DisplayableContainer(**self.initdict)
-		d3.add_child(*[Displayable(**self.initdict) for x in range(5)])
+		for obj in (Displayable(**self.initdict) for x in range(5)):
+			d3.add_child(obj)
 
-		self.disc.add_child(d1, d2, d3)
+		for obj in (d1, d2, d3):
+			self.disc.add_child(obj)
 
 		d3.container[3].focused = True