/
View dependency graph
Depends on
- dh-python (dh-python)
- openstack-pkg-tools (openstack-pkg-tools)
- pytest (python3-pytest)
- python-pytest-cov (python3-pytest-cov)
- python3-defaults (python3-all)
- setuptools (python3-setuptools)
- six (python3-six)
- debhelper-compat
README (full)
sure
An idiomatic testing library for python with powerful and flexible assertions, created by Gabriel Falcão. Sure's developer experience is inspired and modeled after 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'])
| dir | .github/ |
| dir | debian/ |
| dir | docs/ |
| dir | sure/ |
| dir | tests/ |
| file | .coveragerc |
| file | .flake8 |
| file | .gitignore |
| file | .release |
| file | CHANGELOG.md |
| file | COPYING |
| file | MANIFEST.in |
| file | Makefile |
| file | README.rst |
| file | TODO.rst |
| file | development.txt |
| file | docs-requirements.txt |
| file | renovate.json |
| file | requirements.txt |
| file | setup.cfg |
| file | setup.py |
| file | tox.ini |