summaryrefslogtreecommitdiff
path: root/tests/test_build_py.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2010-11-06 02:58:56 +0000
committerÉric Araujo <merwok@netwok.org>2010-11-06 02:58:56 +0000
commitc705a947d03d1505af6e1aeed5db58860fd5b717 (patch)
tree5305ccb834565479e798a47522f7d6760b556e80 /tests/test_build_py.py
parent1208ea17d6e97abffe76f3994d8575be5db3582f (diff)
downloadpython-setuptools-git-c705a947d03d1505af6e1aeed5db58860fd5b717.tar.gz
Merged revisions 86223-86224,86226,86234 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86223 | eric.araujo | 2010-11-06 00:51:56 +0100 (sam., 06 nov. 2010) | 2 lines Always close files in distutils code and tests (#10252). ........ r86224 | eric.araujo | 2010-11-06 00:58:34 +0100 (sam., 06 nov. 2010) | 2 lines Add missing entry for r86223. ........ r86226 | eric.araujo | 2010-11-06 00:59:32 +0100 (sam., 06 nov. 2010) | 2 lines Of course, I forgot one file in r86223. ........ r86234 | eric.araujo | 2010-11-06 03:10:32 +0100 (sam., 06 nov. 2010) | 2 lines Also close file descriptors from os.popen and subprocess.Popen ........
Diffstat (limited to 'tests/test_build_py.py')
-rw-r--r--tests/test_build_py.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/test_build_py.py b/tests/test_build_py.py
index 3e45f6e8..8a69aaa0 100644
--- a/tests/test_build_py.py
+++ b/tests/test_build_py.py
@@ -19,11 +19,15 @@ class BuildPyTestCase(support.TempdirManager,
def test_package_data(self):
sources = self.mkdtemp()
f = open(os.path.join(sources, "__init__.py"), "w")
- f.write("# Pretend this is a package.")
- f.close()
+ try:
+ f.write("# Pretend this is a package.")
+ finally:
+ f.close()
f = open(os.path.join(sources, "README.txt"), "w")
- f.write("Info about this package")
- f.close()
+ try:
+ f.write("Info about this package")
+ finally:
+ f.close()
destination = self.mkdtemp()