diff options
author | PJ Eby <distutils-sig@python.org> | 2005-11-03 02:24:49 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-11-03 02:24:49 +0000 |
commit | 4242a32e194db4930bc6ba1b355d75ad14ad9f0e (patch) | |
tree | ada249e5b1736e79cd80c75fbc8e46d6626359e6 /setuptools/tests/test_resources.py | |
parent | f2b5c33c782f6eeb4098b5091d586438221e975b (diff) | |
download | external_python_setuptools-4242a32e194db4930bc6ba1b355d75ad14ad9f0e.tar.gz external_python_setuptools-4242a32e194db4930bc6ba1b355d75ad14ad9f0e.tar.bz2 external_python_setuptools-4242a32e194db4930bc6ba1b355d75ad14ad9f0e.zip |
Fixed a problem with ``WorkingSet.resolve()`` that prevented version
conflicts from being detected at runtime. (As reported by Ian Bicking.)
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041380
Diffstat (limited to 'setuptools/tests/test_resources.py')
-rw-r--r-- | setuptools/tests/test_resources.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 16531de3..723bd730 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -125,7 +125,6 @@ class DistroTests(TestCase): ad = Environment([]); ws = WorkingSet([]) # Resolving no requirements -> nothing to install self.assertEqual( list(ws.resolve([],ad)), [] ) - # Request something not in the collection -> DistributionNotFound self.assertRaises( DistributionNotFound, ws.resolve, parse_requirements("Foo"), ad @@ -141,6 +140,8 @@ class DistroTests(TestCase): targets = list(ws.resolve(parse_requirements("Foo"), ad)) self.assertEqual(targets, [Foo]) map(ws.add,targets) + self.assertRaises(VersionConflict, ws.resolve, + parse_requirements("Foo==0.9"), ad) ws = WorkingSet([]) # reset # Request an extra that causes an unresolved dependency for "Baz" @@ -157,11 +158,10 @@ class DistroTests(TestCase): list(ws.resolve(parse_requirements("Foo[bar]"), ad)), [Foo,Baz] ) # Requests for conflicting versions produce VersionConflict - self.assertRaises( - VersionConflict, + self.assertRaises( VersionConflict, ws.resolve, parse_requirements("Foo==1.2\nFoo!=1.2"), ad ) - + def testDistroDependsOptions(self): d = self.distRequires(""" Twisted>=1.5 |