summaryrefslogtreecommitdiff
path: root/pkg_resources/tests/test_resources.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-04 13:25:28 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-04 13:25:28 -0500
commit23d5e4a81a61c5e6617fa69fd0b2bc440fa20c45 (patch)
treedf3a695608a8278a4e0dc4a5d6c7987a656484cd /pkg_resources/tests/test_resources.py
parent880ccea0220509bfaf483a50beefc128299a5b03 (diff)
downloadpython-setuptools-git-23d5e4a81a61c5e6617fa69fd0b2bc440fa20c45.tar.gz
Test the report method
Diffstat (limited to 'pkg_resources/tests/test_resources.py')
-rw-r--r--pkg_resources/tests/test_resources.py6
1 files changed, 3 insertions, 3 deletions
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: