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
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'])
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.4.11.tar.gz
(45.9 kB
view details)
File details
Details for the file sure-1.4.11.tar.gz
.
File metadata
- Download URL: sure-1.4.11.tar.gz
- Upload date:
- Size: 45.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c8d5271fb18e2c69e2613af1ad400d8df090f1456081635bd3171847303cdaa |
|
MD5 | 51f28b4ea7a6f59d1dd09f8eaaeabee7 |
|
BLAKE2b-256 | f7c2c87b72fbabb9a55bdb71411cdf79113ab857921d178d4dc0d726d836a15a |