Skip to content

Commit

Permalink
fix the cleanup from the tests so no .pyc/.pyo files get left behind
Browse files Browse the repository at this point in the history
  • Loading branch information
freddrake committed Aug 13, 2004
1 parent 04b7392 commit 9c58d8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classmodule/__init__.py
Expand Up @@ -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:
Expand Down

0 comments on commit 9c58d8f

Please sign in to comment.