Created by: timofurrer
sure
is an awesome testing library which provides powerful and flexible assertions.
This library is awesome because it monkey-patches all python objects with methods like should
or when
or to
:
import sure
(2 + 2).should.be.equal(4)
(3.4 + 4).should.eql(7.5)
{'foo': 'bar'}.should.equal({'foo': 'bar'})
{'foo': 'bar'}.should.have.key('foo').which.should.equal('bar')
step.run.when.called_with(some_id=1).should.return_value(Step.PASSED)
It makes it really easy to use and the the test cases are super readable and maintainable.