Skip to main content

sure 1.2.11

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

Build Status

Installing

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

Documentation

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

Equality

(number).should.equal(number)

import sure

(4).should.be.equal(2 + 2)
(7.5).should.eql(3.5 + 4)
(2).should.equal(8 / 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'])

Download files

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

Source Distribution

sure-1.2.12.tar.gz (27.9 kB view details)

Uploaded Source

File details

Details for the file sure-1.2.12.tar.gz.

File metadata

  • Download URL: sure-1.2.12.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sure-1.2.12.tar.gz
Algorithm Hash digest
SHA256 bb533bce1409d957bec2764392d1dbf91f2167d593eb6b9dcaca647c3ee7dd5e
MD5 fc57c30e76bddba68f84443ec91e7026
BLAKE2b-256 ace1ac82035115b6a1cb39d1c003aed5bcc6f8f7ccdcb9f71a7cc62201044a91

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page