<commit_before>mamba: the definitive testing tool for Python
=============================================

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

Overview
--------

        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('#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_, and send a pull
request. Make sure you add yourself to AUTHORS_.


.. _repository: http://github.com/nestorsalceda/mamba
.. _AUTHORS: http://github.com/nestorsalceda/master/AUTHORS<commit_msg>Highlight python code in readme file<commit_after>mamba: the definitive testing tool for Python
=============================================

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

Overview
--------

.. code:: 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('#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():

                  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_, and send a pull
request. Make sure you add yourself to AUTHORS_.


.. _repository: http://github.com/nestorsalceda/mamba
.. _AUTHORS: http://github.com/nestorsalceda/master/AUTHORS
{'fraction_non_alphanumeric': 0.09178743961352658, 'fraction_numerical': 0.0, 'mean_word_length': 1.6163124641010913, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1810625', 'n_tokens_mistral': 1202, 'n_tokens_neox': 1089, 'n_words': 219}