diff options
author | Ian Bicking <ian@ianbicking.org> | 2005-05-16 03:20:15 +0000 |
---|---|---|
committer | Ian Bicking <ian@ianbicking.org> | 2005-05-16 03:20:15 +0000 |
commit | 871905e038456874c6f5071980f9ba1a79bca65e (patch) | |
tree | 85fc7777f27afbf2b00e503745790a948dd14d0a /paste | |
parent | 8fc6f3097d643d591539635ccd99a97e361d46f4 (diff) | |
download | paste-git-871905e038456874c6f5071980f9ba1a79bca65e.tar.gz |
Fixed expired .pyc file bug
Diffstat (limited to 'paste')
-rwxr-xr-x | paste/tests/doctest_webapp.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/paste/tests/doctest_webapp.py b/paste/tests/doctest_webapp.py index 43610f7..c13faa7 100755 --- a/paste/tests/doctest_webapp.py +++ b/paste/tests/doctest_webapp.py @@ -202,6 +202,14 @@ def append_to_file(path, version, data): f = open(path, 'a') f.write(data) f.close() + # I think these appends can happen so quickly (in less than a second) + # that the .pyc file doesn't appear to be expired, even though it + # is after we've made this change; so we have to get rid of the .pyc + # file: + if path.endswith('.py'): + pyc_file = path + 'c' + if os.path.exists(pyc_file): + os.unlink(pyc_file) show_file(path, version, description='added to %s' % path, data=data) |