[pypy-svn] r64300 - pypy/trunk/lib-python/modified-2.5.2/test
iko at codespeak.net
iko at codespeak.net
Fri Apr 17 19:13:14 CEST 2009
Author: iko
Date: Fri Apr 17 19:13:14 2009
New Revision: 64300
Modified:
pypy/trunk/lib-python/modified-2.5.2/test/test_dumbdbm.py
Log:
explicitly close the data file so that windows can delete it.
Modified: pypy/trunk/lib-python/modified-2.5.2/test/test_dumbdbm.py
==============================================================================
--- pypy/trunk/lib-python/modified-2.5.2/test/test_dumbdbm.py (original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/test_dumbdbm.py Fri Apr 17 19:13:14 2009
@@ -83,16 +83,19 @@
f.close()
# Mangle the file by adding \r before each newline
- data = open(_fname + '.dir').read()
+ f = open(_fname + '.dir')
+ data = f.read()
data = data.replace('\n', '\r\n')
+ f.close()
f = open(_fname + '.dir', 'wb')
f.write(data)
f.close()
+ data.close()
f = dumbdbm.open(_fname)
self.assertEqual(f['1'], 'hello')
self.assertEqual(f['2'], 'hello2')
-
+ f.close()
def read_helper(self, f):
keys = self.keys_helper(f)
More information about the Pypy-commit
mailing list