[](https://travis-ci.org/nestorsalceda/mamba)
mamba is the definitive BDD testing framework for Python. Born under the banner of Behavior Driven Development.
##Installation
To install mamba, just:
``` sh
pip install mamba
```
##Overview
```python
# Importing mamba is not needed!
# import mamba
with description('mamba'):
with it('is tested with mamba itself'):
pass
with it('supports python 3'):
pass
with
with context('when listing features'):
with it('supports example groups'):
pass
with context('hooks'):
with before.all:
print 'This code will be run once, before all examples'
with before.each:
print 'This code will be run before each example'
with after.each:
print 'This code will be run after each example'
with after.all:
print 'This code will be run once, after all examples'
with context('pending tests'):
with _context('when running pending contexts (marked with a underscore)'):
with it('will not run any spec under a pending context'):
pass
with _it('will not run pending specs (marked with underscore)'):
pass
with it('highlights slow tests'):
sleep(10)
with context(ASampleClass):
with it('has an instance in subject property'):
expect(self.subject).to.be.a(ASampleClass)
with context('when writing assertions'):
with it('can be used with plain assertions'):
assert True
with it('can be used with hamcrest style assertions'):
assert_that(True, is_(True))
with it('can be used with should_dsl style assertions'):
True |should| be(True)
with it('can be used with sure style assertions'):
True.should.be.true
expect(True).to.be.true
with it('is assertion framework agnostic'):
pass
with context('when using tests doubles'):
with it('can be used with mockito'):
stub = mock()
when(stub).is_usable_with_mockito().thenReturn(True)
expect(stub.is_usable_with_mockito()).to.be.true
with it('can be used with doublex'):
with Spy() as sender:
sender.is_usable_with_doublex().returns(True)
assert_that(sender.is_usable_with_doublex(), is_(True))
assert_that(sender.is_usable_with_doublex, called())
with it('can be used with mock'):
is_usable_with_mock = Mock(return_value=True)
assert mock()
with it('is test doubles framework agnostic'):
pass
```
##Contribute
If you'd like to contribute, fork [repository](http://github.com/nestorsalceda/mamba), and send a pull request.
Metadata
Release files for mamba 0.8.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mamba-0.8.2.tar.gz | 13.4 kB | Without provenance | Details for mamba-0.8.2.tar.gz |
Release files / mamba-0.8.2.tar.gz
| Download URL | mamba-0.8.2.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ece61321a90b904e8f2859f4966d3fd61b4161137e73d4a3f8015b6f1d944fd
|
|
BLAKE2b-256 checksum How to use checksums |
24a23b8d2e0511d68f2547a623ac868e2ed909426173c355e3ec75bf90ea253a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for mamba 0.8.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.