From f5ba0d6749c757ad86b767998f5a64a2109e86c5 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Mon, 4 Jul 2016 12:55:02 +0100 Subject: Fix FSImportHook tests on python3 --- fs/tests/test_importhook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/tests/test_importhook.py b/fs/tests/test_importhook.py index b04a86c..e0d1ad7 100644 --- a/fs/tests/test_importhook.py +++ b/fs/tests/test_importhook.py @@ -23,8 +23,8 @@ class TestFSImportHook(unittest.TestCase): if isinstance(mph,FSImportHook): sys.meta_path.remove(mph) for ph in list(sys.path_hooks): - if issubclass(ph,FSImportHook): - sys.path_hooks.remove(mph) + if isinstance(ph, type) and issubclass(ph,FSImportHook): + sys.path_hooks.remove(ph) for (k,v) in sys.modules.items(): if k.startswith("fsih_"): del sys.modules[k] -- cgit v1.2.1