aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_dist_info.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2013-06-19 11:45:38 +0100
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2013-06-19 11:45:38 +0100
commit8d016844c5934fe8f7ee4c559ab5a1f2133fa6dc (patch)
tree199a8e4792f87c951fcf82197061c35e5805d100 /setuptools/tests/test_dist_info.py
parent744a61f18bbfcbf7dfaa08886185b4595d8b7bcb (diff)
parent5d9d3930f400a754f38be2a4de21a7f9ed00f5f4 (diff)
downloadexternal_python_setuptools-8d016844c5934fe8f7ee4c559ab5a1f2133fa6dc.tar.gz
external_python_setuptools-8d016844c5934fe8f7ee4c559ab5a1f2133fa6dc.tar.bz2
external_python_setuptools-8d016844c5934fe8f7ee4c559ab5a1f2133fa6dc.zip
Merged upstream changes.
--HG-- branch : single-codebase
Diffstat (limited to 'setuptools/tests/test_dist_info.py')
-rw-r--r--setuptools/tests/test_dist_info.py43
1 files changed, 23 insertions, 20 deletions
diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
index fcb78c36..a8adb68c 100644
--- a/setuptools/tests/test_dist_info.py
+++ b/setuptools/tests/test_dist_info.py
@@ -51,30 +51,33 @@ class TestDistInfo(unittest.TestCase):
'VersionedDistribution-2.718.dist-info')
os.mkdir(versioned)
metadata_file = open(os.path.join(versioned, 'METADATA'), 'w+')
- metadata_file.write(DALS(
- """
- Metadata-Version: 1.2
- Name: VersionedDistribution
- Requires-Dist: splort (4)
- Provides-Extra: baz
- Requires-Dist: quux (>=1.1); extra == 'baz'
- """))
- metadata_file.close()
-
+ try:
+ metadata_file.write(DALS(
+ """
+ Metadata-Version: 1.2
+ Name: VersionedDistribution
+ Requires-Dist: splort (4)
+ Provides-Extra: baz
+ Requires-Dist: quux (>=1.1); extra == 'baz'
+ """))
+ finally:
+ metadata_file.close()
unversioned = os.path.join(self.tmpdir,
'UnversionedDistribution.dist-info')
os.mkdir(unversioned)
metadata_file = open(os.path.join(unversioned, 'METADATA'), 'w+')
- metadata_file.write(DALS(
- """
- Metadata-Version: 1.2
- Name: UnversionedDistribution
- Version: 0.3
- Requires-Dist: splort (==4)
- Provides-Extra: baz
- Requires-Dist: quux (>=1.1); extra == 'baz'
- """))
- metadata_file.close()
+ try:
+ metadata_file.write(DALS(
+ """
+ Metadata-Version: 1.2
+ Name: UnversionedDistribution
+ Version: 0.3
+ Requires-Dist: splort (==4)
+ Provides-Extra: baz
+ Requires-Dist: quux (>=1.1); extra == 'baz'
+ """))
+ finally:
+ metadata_file.close()
def tearDown(self):
shutil.rmtree(self.tmpdir)