From d8de6c98d879adbe5b8df731a5b61c06a48b9a2f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 12:43:13 -0500 Subject: Add another assertion on the exception. --- pkg_resources/tests/test_resources.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkg_resources') diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index fbb9db62..cf16bf03 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -172,9 +172,12 @@ class TestDistro: # Activation list now includes resolved dependency assert list(ws.resolve(parse_requirements("Foo[bar]"), ad)) ==[Foo,Baz] # Requests for conflicting versions produce VersionConflict - with pytest.raises(VersionConflict): + with pytest.raises(VersionConflict) as vc: ws.resolve(parse_requirements("Foo==1.2\nFoo!=1.2"), ad) + msg = 'Foo 0.9 is installed but Foo==1.2 is required by []' + assert str(vc).endswith(msg) + def testDistroDependsOptions(self): d = self.distRequires(""" Twisted>=1.5 -- cgit v1.2.3