diff options
| author | pjenvey <devnull@localhost> | 2008-08-22 00:15:37 +0000 |
|---|---|---|
| committer | pjenvey <devnull@localhost> | 2008-08-22 00:15:37 +0000 |
| commit | e37d96d50cb34c8bbb2ffefcf9282944e2d40e2a (patch) | |
| tree | 4b65d4616b75b9915f16fd29a0f3fb3a45bbf69a | |
| parent | 4e009ba68f8acdcdb998c1d9fb619c8b1f0bf96e (diff) | |
| download | paste-e37d96d50cb34c8bbb2ffefcf9282944e2d40e2a.tar.gz | |
don't assume CPython GC, immediately close the file handle
| -rw-r--r-- | tests/test_fileapp.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_fileapp.py b/tests/test_fileapp.py index e48dca1..edb4e4c 100644 --- a/tests/test_fileapp.py +++ b/tests/test_fileapp.py @@ -129,7 +129,9 @@ def test_dir(): try: tmpfile = os.path.join(tmpdir, 'file') tmpsubdir = os.path.join(tmpdir, 'dir') - open(tmpfile, 'w').write('abcd') + fp = open(tmpfile, 'w') + fp.write('abcd') + fp.close() os.mkdir(tmpsubdir) try: from paste import fileapp |
