summaryrefslogtreecommitdiff
path: root/setuptools/tests/test_dist_info.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-06-18 15:01:44 -0500
committerJason R. Coombs <jaraco@jaraco.com>2013-06-18 15:01:44 -0500
commitb0abfb1c076baced9bf182a357dd47e9482bf065 (patch)
tree55a30c8bdd916583a818895c0b660f73815202d0 /setuptools/tests/test_dist_info.py
parentc04abca662dcbffd00d928e06fbf32b9f49f8e57 (diff)
parent3c86c861ab9665df0e502f250a7471d09240e413 (diff)
downloadpython-setuptools-git-b0abfb1c076baced9bf182a357dd47e9482bf065.tar.gz
Merge Python 3 native support from distribute
--HG-- rename : tests/test_distribute_setup.py => tests/test_ez_setup.py
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)