drslump / pyshould

Should style asserts based on pyhamcrest
MIT License
38 stars 7 forks source link

Support context manager protocol (with keyword) for matchers. #1

Closed drslump closed 12 years ago

drslump commented 12 years ago

Right now only the 'thrown' one supports this feature.

with should.throw(TypeError):
    raise TypeError('foo')

with should.throw:
    raise IOError()

with should.not_raise:
    pass