From 0076a74fe1c1e496477bb403c49014eb0b8a5a24 Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 26 Jan 2010 20:36:06 +0100 Subject: tc_ext: small update --- test/tc_ext.py | 17 ++++++++++------- 1 file 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. -- cgit 1.4.1-2-gfad0