Skip to content
utility belt for automated testing in python (inspired by @visionmedia's should.js)
Python Other

sure 1.2.24

A testing library for python with powerful and flexible assertions. Sure is heavily inspired by should.js

Build Status


user@machine:~$ [sudo] pip install sure


Available in the website or under the spec directory.

You can also build the documentation locally using markment:

pip install markment
markment --server --theme=rtd ./spec/

Here is a tease



import sure

(4) + 2)
(7.5).should.eql(3.5 + 4)


Assert dictionary and its contents

{'foo': 'bar'}.should.equal({'foo': 'bar'})
{'foo': 'bar'}.should.have.key('foo').which.should.equal('bar')

"A string".lower().should.equal("a string") also works

"Awesome ASSERTIONS".lower().split().should.equal(['awesome', 'assertions'])
Something went wrong with that request. Please try again.