Skip to main content

utility belt for automated testing in python for python

Project description

An idiomatic testing library for python with powerful and flexible assertions. Sure is heavily inspired in RSpec Expectations and should.js

Build Status PyPI package version PyPI python versions Join the chat at https://gitter.im/gabrielfalcao/sure

Installing

$ pip install sure

Documentation

Available in the website or under the docs directory.

You can also build the documentation locally using sphinx:

make docs

Here is a tease

Equality

(number).should.equal(number)

import sure

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

(3).shouldnt.be.equal(5)

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'])

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sure, version 1.4.8
Filename, size File type Python version Upload date Hashes
Filename, size sure-1.4.8-py2-none-any.whl (22.9 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size sure-1.4.8-py3-none-any.whl (22.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size sure-1.4.8.tar.gz (45.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page