Skip to main content

utility belt for automated testing in python for python

Project description

sure 1.2.24

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)

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

Project details


Release history Release notifications | RSS feed

This version

1.3.0

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.3.0.tar.gz (43.0 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for sure-1.3.0.tar.gz
Algorithm Hash digest
SHA256 bff9f400f67207774645eccbb045b85e364b59d235fc9bac3d1b55a90edbf210
MD5 c1960616dcb1cc84befcf9e9e722c655
BLAKE2b-256 ca3d9755e977aa94d53625b256aee553134a6a9471fa60d63e681bd5871c1d77

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page