aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>2012-10-24 03:19:23 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>2012-10-24 03:19:23 +0200
commita3966d17f6f7f0769b83d5ef56fc8f97f6a4b415 (patch)
treee28cada6983e97f9111768fe71c3ba1208fc2800
parent1747a08955d6db3c7ad4403128501ea13d48ac40 (diff)
downloadexternal_python_setuptools-a3966d17f6f7f0769b83d5ef56fc8f97f6a4b415.tar.gz
external_python_setuptools-a3966d17f6f7f0769b83d5ef56fc8f97f6a4b415.tar.bz2
external_python_setuptools-a3966d17f6f7f0769b83d5ef56fc8f97f6a4b415.zip
Issue #329: Properly close files created by tests for compatibility with Jython.
--HG-- branch : distribute extra : rebase_source : 09c503106ef73b7694e13443ae899666652922a4
-rw-r--r--CHANGES.txt6
-rw-r--r--setuptools/tests/test_dist_info.py8
2 files changed, 12 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 12b4907a..9513ed45 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,12 @@ CHANGES
=======
------
+0.6.31
+------
+
+* Issue #329: Properly close files created by tests for compatibility with Jython.
+
+------
0.6.30
------
diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
index 623ccc47..fcb78c36 100644
--- a/setuptools/tests/test_dist_info.py
+++ b/setuptools/tests/test_dist_info.py
@@ -50,7 +50,8 @@ class TestDistInfo(unittest.TestCase):
versioned = os.path.join(self.tmpdir,
'VersionedDistribution-2.718.dist-info')
os.mkdir(versioned)
- open(os.path.join(versioned, 'METADATA'), 'w+').write(DALS(
+ metadata_file = open(os.path.join(versioned, 'METADATA'), 'w+')
+ metadata_file.write(DALS(
"""
Metadata-Version: 1.2
Name: VersionedDistribution
@@ -58,11 +59,13 @@ class TestDistInfo(unittest.TestCase):
Provides-Extra: baz
Requires-Dist: quux (>=1.1); extra == 'baz'
"""))
+ metadata_file.close()
unversioned = os.path.join(self.tmpdir,
'UnversionedDistribution.dist-info')
os.mkdir(unversioned)
- open(os.path.join(unversioned, 'METADATA'), 'w+').write(DALS(
+ metadata_file = open(os.path.join(unversioned, 'METADATA'), 'w+')
+ metadata_file.write(DALS(
"""
Metadata-Version: 1.2
Name: UnversionedDistribution
@@ -71,6 +74,7 @@ class TestDistInfo(unittest.TestCase):
Provides-Extra: baz
Requires-Dist: quux (>=1.1); extra == 'baz'
"""))
+ metadata_file.close()
def tearDown(self):
shutil.rmtree(self.tmpdir)