From 8418a7f14c93212f38cdc282783bedbae6ee3cfc 2013-03-24 14:38:56 From: Takafumi Arakaki Date: 2013-03-24 14:38:56 Subject: [PATCH] Use list comprehension instead of filter+lambda --- diff --git a/IPython/core/tests/test_run.py b/IPython/core/tests/test_run.py index 4bb1c71..dac65ed 100644 --- a/IPython/core/tests/test_run.py +++ b/IPython/core/tests/test_run.py @@ -378,7 +378,7 @@ class TestMagicRunWithPackage(unittest.TestCase): def tearDown(self): os.chdir(self.__orig_cwd) - sys.path[:] = filter(lambda x: x != self.tempdir.name, sys.path) + sys.path[:] = [p for p in sys.path if p != self.tempdir.name] self.tempdir.cleanup() def check_run_submodule(self, submodule, opts=''):