From 23d5e4a81a61c5e6617fa69fd0b2bc440fa20c45 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 4 Jan 2015 13:25:28 -0500 Subject: Test the report method --- pkg_resources/tests/test_resources.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg_resources/tests') diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 79961e6c..5cf3a657 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -175,8 +175,8 @@ class TestDistro: 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) + msg = 'Foo 0.9 is installed but Foo==1.2 is required' + assert vc.value.report() == msg def testDistroDependsOptions(self): d = self.distRequires(""" @@ -218,7 +218,7 @@ class TestWorkingSet: ws.find(req) msg = 'Foo 1.2 is installed but Foo<1.2 is required' - assert str(vc).endswith(msg) + assert vc.value.report() == msg class TestEntryPoints: -- cgit v1.2.3