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
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
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.25.tar.gz
(40.4 kB
view details)
File details
Details for the file sure-1.2.25.tar.gz
.
File metadata
- Download URL: sure-1.2.25.tar.gz
- Upload date:
- Size: 40.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b7b2a817c040834a52bee8ef82ed6b0e076722edf30e7efabbad4c6dc39824a |
|
MD5 | f6d602a969046cb4be987edc9b701519 |
|
BLAKE2b-256 | bffa65db1f6494d074475b41feae3ca7e552ec2f2386791eff2bc19576b1703e |