summary refs log tree commit diff stats
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
parent11d09d02d3168fd6e264de9a5f649bcb6d95af95 (diff)
downloadranger-0076a74fe1c1e496477bb403c49014eb0b8a5a24.tar.gz
tc_ext: small update
-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.
> 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219