Simplify wheel exception raises assertion

This commit is contained in:
Matthew Iversen 2014-02-19 18:32:41 +11:00
parent 5a6855dcf1
commit f0d093feec
1 changed files with 2 additions and 7 deletions

View File

@ -68,15 +68,10 @@ def test_check_compatibility():
# Major version is higher - should be incompatible
higher_v = (vc[0] + 1, vc[1])
# test raises
with pytest.raises(UnsupportedWheel):
wheel.check_compatibility(higher_v, name)
# test raises with correct error
try:
with pytest.raises(UnsupportedWheel) as e:
wheel.check_compatibility(higher_v, name)
except UnsupportedWheel as e:
assert 'is not compatible' in str(e)
assert 'is not compatible' in str(e)
# Should only log.warn - minor version is greator
higher_v = (vc[0], vc[1] + 1)