about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-26 20:36:06 +0100
committerhut <hut@lavabit.com>2010-01-26 20:36:06 +0100
commit0076a74fe1c1e496477bb403c49014eb0b8a5a24 (patch)
treebdc707a9851c9a64d72cff2b02f15ba74152a889 /test
parent11d09d02d3168fd6e264de9a5f649bcb6d95af95 (diff)
downloadranger-0076a74fe1c1e496477bb403c49014eb0b8a5a24.tar.gz
tc_ext: small update
Diffstat (limited to 'test')
-rw-r--r--test/tc_ext.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/tc_ext.py b/test/tc_ext.py
index 2ee4a407..c57d4aa8 100644
--- a/test/tc_ext.py
+++ b/test/tc_ext.py
@@ -75,14 +75,17 @@ class TestCases(unittest.TestCase):
 			return depth <= 1
 
 		from ranger.ext import mount_path
+		original_ismount = mount_path.ismount
 		mount_path.ismount = my_ismount
-
-		mp = mount_path.mount_path
-
-		self.assertEqual('/home', mp('/home/hut/porn/bondage'))
-		self.assertEqual('/', mp('/'))
-		self.assertEqual('/media/sdb1', mp('/media/sdb1/foo/bar'))
-		self.assertEqual('/media/sdc2', mp('/media/sdc2/a/b/c/d/e'))
+		try:
+			mp = mount_path.mount_path
+
+			self.assertEqual('/home', mp('/home/hut/porn/bondage'))
+			self.assertEqual('/', mp('/'))
+			self.assertEqual('/media/sdb1', mp('/media/sdb1/foo/bar'))
+			self.assertEqual('/media/sdc2', mp('/media/sdc2/a/b/c/d/e'))
+		finally:
+			mount_path.ismount = original_ismount
 
 		# TODO: links are not tested but I don't see how its possible
 		# without messing around with mounts.