aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_dist_info.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2012-07-22 15:15:53 -0400
committerJason R. Coombs <jaraco@jaraco.com>2012-07-22 15:15:53 -0400
commit9d94aa8feb11530c01dbc9d594f4a5f5c20740ea (patch)
treebb12ddc066d9abccb453a55225ff32485152ff45 /setuptools/tests/test_dist_info.py
parent4af2d58dbfad9be4bd9df2612c8292bc29f8f4e9 (diff)
downloadexternal_python_setuptools-9d94aa8feb11530c01dbc9d594f4a5f5c20740ea.tar.gz
external_python_setuptools-9d94aa8feb11530c01dbc9d594f4a5f5c20740ea.tar.bz2
external_python_setuptools-9d94aa8feb11530c01dbc9d594f4a5f5c20740ea.zip
Updated imports, removed excess whitespace
--HG-- branch : distribute extra : rebase_source : a2cc4dde8a9a5de8c92e277099610e507fce2973
Diffstat (limited to 'setuptools/tests/test_dist_info.py')
-rw-r--r--setuptools/tests/test_dist_info.py31
1 files changed, 17 insertions, 14 deletions
diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
index 119cc68b..fede54da 100644
--- a/setuptools/tests/test_dist_info.py
+++ b/setuptools/tests/test_dist_info.py
@@ -1,6 +1,10 @@
"""Test .dist-info style distributions.
"""
-import os, shutil, tempfile, unittest
+import os
+import shutil
+import tempfile
+import unittest
+
import pkg_resources
from pkg_resources import Requirement
try:
@@ -15,29 +19,29 @@ class TestDistInfo(unittest.TestCase):
dists = {}
for d in pkg_resources.find_distributions(self.tmpdir):
dists[d.project_name] = d
-
+
assert len(dists) == 2, dists
-
+
unversioned = dists['UnversionedDistribution']
versioned = dists['VersionedDistribution']
-
- assert versioned.version == '2.718' # from filename
+
+ assert versioned.version == '2.718' # from filename
assert unversioned.version == '0.3' # from METADATA
-
- @unittest.skipIf(not has_markerlib,
- "install markerlib to test conditional dependencies")
+
+ @unittest.skipIf(not has_markerlib,
+ "install markerlib to test conditional dependencies")
def test_conditional_dependencies(self):
- requires = [Requirement.parse('splort==4'),
+ requires = [Requirement.parse('splort==4'),
Requirement.parse('quux>=1.1')]
-
+
for d in pkg_resources.find_distributions(self.tmpdir):
self.assertEquals(d.requires(), requires[:1])
self.assertEquals(d.requires(extras=('baz',)), requires)
- self.assertEquals(d.extras, ['baz'])
+ self.assertEquals(d.extras, ['baz'])
def setUp(self):
self.tmpdir = tempfile.mkdtemp()
- versioned = os.path.join(self.tmpdir,
+ versioned = os.path.join(self.tmpdir,
'VersionedDistribution-2.718.dist-info')
os.mkdir(versioned)
open(os.path.join(versioned, 'METADATA'), 'w+').write(
@@ -48,7 +52,7 @@ Provides-Extra: baz
Requires-Dist: quux (>=1.1); extra == 'baz'
""")
- unversioned = os.path.join(self.tmpdir,
+ unversioned = os.path.join(self.tmpdir,
'UnversionedDistribution.dist-info')
os.mkdir(unversioned)
open(os.path.join(unversioned, 'METADATA'), 'w+').write(
@@ -62,4 +66,3 @@ Requires-Dist: quux (>=1.1); extra == 'baz'
def tearDown(self):
shutil.rmtree(self.tmpdir)
-