[pypy-svn] r62793 - pypy/trunk/lib-python/modified-2.5.2/test

afa at codespeak.net afa at codespeak.net
Tue Mar 10 10:14:40 CET 2009


Author: afa
Date: Tue Mar 10 10:14:37 2009
New Revision: 62793

Added:
   pypy/trunk/lib-python/modified-2.5.2/test/test_pkgimport.py
      - copied, changed from r62778, pypy/trunk/lib-python/2.5.2/test/test_pkgimport.py
Log:
Don't rely on refcounting to close the file.


Copied: pypy/trunk/lib-python/modified-2.5.2/test/test_pkgimport.py (from r62778, pypy/trunk/lib-python/2.5.2/test/test_pkgimport.py)
==============================================================================
--- pypy/trunk/lib-python/2.5.2/test/test_pkgimport.py	(original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/test_pkgimport.py	Tue Mar 10 10:14:37 2009
@@ -22,7 +22,8 @@
         self.package_dir = os.path.join(self.test_dir,
                                         self.package_name)
         os.mkdir(self.package_dir)
-        open(os.path.join(self.package_dir, '__init__'+os.extsep+'py'), 'w')
+        f = open(os.path.join(self.package_dir, '__init__'+os.extsep+'py'), 'w')
+        f.close()
         self.module_path = os.path.join(self.package_dir, 'foo'+os.extsep+'py')
 
     def tearDown(self):



More information about the Pypy-commit mailing list