Expects
Expects is an expressive and extensible TDD/BDD assertion library for Python. Expects can be extended by defining new matchers.
Usage
Just import the expect
callable and the built-in matchers and start writing test assertions.
from expects import *
expect([]).to(be_empty)
expect(False).not_to(be_true)
expect({
'name': 'Jack',
'email': 'jack@example.com'
}).to(have_key('name', match('\w+')))
expect(str).to(have_property('split') & be_callable)
expect(lambda: foo).to(raise_error(NameError))
expect('Foo').to(equal('Bar') | equal('Foo'))
Contents
- Installation
- Matchers
- Aliases
- Custom Matchers
- 3rd Party Matchers
- Changes
- 0.9.0 (2018-10-25)
- 0.8.0 (2016-05-15)
- 0.8.0rc5 (2016-05-07)
- 0.8.0rc4 (2015-10-14)
- 0.8.0rc3 (2015-10-07)
- 0.8.0rc2 (2015-08-14)
- 0.8.0rc1 (2015-07-17)
- 0.7.0 (2015-06-26)
- 0.7.1 (2015-06-09)
- 0.7.0 (2015-03-01)
- 0.6.2 (2014-12-10)
- 0.6.1 (2014-11-30)
- 0.6.0 (2014-11-24)
- 0.5.0 (2014-09-20)
- 0.4.2 (2014-08-16)
- 0.4.1 (2014-08-16)
- 0.4.0 (2014-08-15)
- 0.3.0 (2014-06-29)
- 0.2.3 (2014-06-04)
- 0.2.2 (2014-05-20)
- 0.2.1 (2014-03-22)
- 0.2.0 (2014-02-05)
- 0.1.1 (2013-08-20)
- 0.1.0 (2013-08-11)