Skip to main content
#mamba: the definitive testing tool for Python

[![Build Status](https://travis-ci.org/nestorsalceda/mamba.png)](https://travis-ci.org/nestorsalceda/mamba)

mamba is the definitive BDD testing framework for Python. Born under the banner of Behaviour Driven Development.

##Overview

```python

from mamba import describe, context

with describe('mamba'):
def it_should_be_tested_with_mamba_itself():
pass

with context('#features'):
def it_supports_example_groups():
pass

with context('#hooks'):
def before_all():
pass

def before():
pass

def after():
pass

def after_all():
pass

with context('#assertion_framework_agnostic'):
def it_should_be_usable_with_plain_assertions():
assert True

def it_should_be_usable_with_hamcrest_style_assertions():
assert_that(True, is_(True))

def it_should_be_usable_with_should_dsl_style_assertions():
True |should| be(True)

def it_should_be_usable_with_sure_style_assertions():
True.should.be.true

expect(True).to.be.true

with context('#test_doubles_framework_agnostic'):
def it_should_be_usable_with_mockito():
stub = mock()
when(stub).is_usable_with_mockito().thenReturn(True)

expect(stub.is_usable_with_mockito()).to.be.true

def it_should_be_usable_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())

def it_should_be_usable_with_mock():
is_usable_with_mock = Mock(return_value=True)

assert mock()
```


##Contribute

If you'd like to contribute, fork [repository](http://github.com/nestorsalceda/mamba), and send a pull request.

Release files for mamba 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mamba 0.1
File Size Uploaded
mamba-0.1.tar.gz 4.2 kB Details

Release files / mamba-0.1.tar.gz

Download URL mamba-0.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0f2546e5be3f5fe9b5c5138e1354783f3d38c4dd26f8defaadd366ae22f33ec7
BLAKE2b-256 checksum
How to use checksums
5b9f0907c3dac5afe5b3cd1921df0e89af1ab4c01eeb16341dc118377cb45419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.11.3

1 release file

0.11.2

1 release file

0.11.1

1 release file

0.11.0

1 release file

0.10

1 release file

0.9.3

1 release file

0.9.2

1 release file

0.9.1

1 release file

0.8.6

1 release file

0.8.5

1 release file

0.8.4

1 release file

0.8.3

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page