An idiomatic testing library for python with powerful and flexible assertions, created by Gabriel Falcão. Sure's developer experience is inspired and modeled after RSpec Expectations and should.js.
This is a fork of Gabriel's sure library, maintained at http://github.com/getmoto/surer. It provides support for more recent Python-versions, but does not differ in functionality.
$ pip install surer
Available in the website or under the
docs
directory.
You can also build the documentation locally using sphinx:
make docs
import surer
(4).should.be.equal(2 + 2)
(7.5).should.eql(3.5 + 4)
(3).shouldnt.be.equal(5)
{'foo': 'bar'}.should.equal({'foo': 'bar'})
{'foo': 'bar'}.should.have.key('foo').which.should.equal('bar')
"Awesome ASSERTIONS".lower().split().should.equal(['awesome', 'assertions'])