diff options
| author | ianb <devnull@localhost> | 2005-05-16 03:20:15 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-05-16 03:20:15 +0000 |
| commit | 5bac0516084aac41c49e7dfbbb7fc4f18c1382f4 (patch) | |
| tree | 85fc7777f27afbf2b00e503745790a948dd14d0a /paste | |
| parent | 4a290bd14e83c30d8803f06ac45e3317fe6b47ed (diff) | |
| download | paste-5bac0516084aac41c49e7dfbbb7fc4f18c1382f4.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) |
