From 9c58d8f427c5372cf09b350a1ba1b1369f8cf1cd Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 13 Aug 2004 21:50:21 +0000 Subject: [PATCH] fix the cleanup from the tests so no .pyc/.pyo files get left behind --- classmodule/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classmodule/__init__.py b/classmodule/__init__.py index 1503afcc..b34d31e1 100644 --- a/classmodule/__init__.py +++ b/classmodule/__init__.py @@ -719,6 +719,10 @@ def safe_import(path, default=None): Now clean up the temporary module, just to play nice: >>> os.unlink(filename) + >>> if os.path.exists(filename + 'c'): + ... os.unlink(filename + 'c') + >>> if os.path.exists(filename + 'o'): + ... os.unlink(filename + 'o') """ module = sys.modules.get(path, default) if module is default: