{"id":13746462,"url":"https://github.com/nestorsalceda/mamba","last_synced_at":"2025-05-14T18:02:48.603Z","repository":{"id":7405097,"uuid":"8735726","full_name":"nestorsalceda/mamba","owner":"nestorsalceda","description":"The definitive testing tool for Python. Born under the banner of Behavior Driven Development (BDD).","archived":false,"fork":false,"pushed_at":"2023-11-09T15:31:43.000Z","size":570,"stargazers_count":528,"open_issues_count":53,"forks_count":64,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-05-01T22:26:50.118Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://nestorsalceda.github.io/mamba","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"shutterstock/WebService-Shutterstock","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nestorsalceda.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2013-03-12T18:53:42.000Z","updated_at":"2025-04-30T17:10:22.000Z","dependencies_parsed_at":"2024-01-13T01:36:17.421Z","dependency_job_id":"eea985d8-1c5b-47d7-a769-7f8b508cd433","html_url":"https://github.com/nestorsalceda/mamba","commit_stats":{"total_commits":416,"total_committers":24,"mean_commits":"17.333333333333332","dds":0.21875,"last_synced_commit":"7b40daf79697710e6e269198e6496c2ff0d4a0b9"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestorsalceda%2Fmamba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestorsalceda%2Fmamba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestorsalceda%2Fmamba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nestorsalceda%2Fmamba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nestorsalceda","download_url":"https://codeload.github.com/nestorsalceda/mamba/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253459344,"owners_count":21912025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T06:00:54.041Z","updated_at":"2025-05-14T18:02:43.565Z","avatar_url":"https://github.com/nestorsalceda.png","language":"Python","funding_links":[],"categories":["Python","Popular Frameworks","Testing Tools"],"sub_categories":["Behavior Driven Development (BDD)"],"readme":"# mamba: the definitive test runner for Python\n\n[![Build Status](https://travis-ci.org/nestorsalceda/mamba.svg)](https://travis-ci.org/nestorsalceda/mamba)\n[![Latest PyPI Version](https://img.shields.io/pypi/v/mamba.svg)](https://pypi.python.org/pypi/mamba)\n[![Read The Docs Status](https://readthedocs.org/projects/pip/badge/)](https://mamba-bdd.readthedocs.io/en/latest/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/mamba.svg)](https://pypi.python.org/pypi/mamba/)\n\n\n**mamba** is the definitive test runner for Python. Born under the banner of [behavior-driven development](https://en.wikipedia.org/wiki/Behavior-driven_development).\n\n## Install\n\nI recommend to use pipenv for managing your dependencies, thus you can install mamba like any other Python package.\n\nBy example:\n\n```\n  $ pipenv install mamba\n```\n\nBut you also can use pip:\n\n```\n  $ pip install mamba\n```\n\n\n## Getting Started\n\nWrite a very simple example that describes your code behaviour:\n\n```python\n  # tennis_spec.py\n\n  from mamba import description, context, it\n  from expects import expect, equal\n\n  with description('Tennis') as self:\n    with it('starts with 0 - 0 score'):\n      rafa_nadal = \"Rafa Nadal\"\n      roger_federer = \"Roger Federer\"\n      game = Game(rafa_nadal, roger_federer)\n\n      expect(game.score()).to(equal((0, 0)))\n```\n\n\nRun the example, and don't forget to watch it fail!\n\n```\n  $ pipenv run mamba tennis_spec.py\n\n  F\n\n  1 examples failed of 1 ran in 0.0023 seconds\n\n  Failures:\n\n    1) Tennis it starts with 0 - 0 score\n      Failure/Error: tennis_spec.py game = Game(rafa_nadal, roger_federer)\n          NameError: global name 'Game' is not defined\n\n      File \"tennis_spec.py\", line 8, in 00000001__it starts with 0 - 0 score--\n          game = Game(rafa_nadal, roger_federer)\n```\n\nNow write as little code for making it pass.\n\n```python\n  # tennis_spec.py\n\n  from mamba import description, context, it\n  from expects import expect, equal\n\n  import tennis\n\n  with description('Tennis') as self:\n    with it('starts with 0 - 0 score'):\n      rafa_nadal = \"Rafa Nadal\"\n      roger_federer = \"Roger Federer\"\n      game = tennis.Game(rafa_nadal, roger_federer)\n\n      expect(game.score()).to(equal((0, 0)))\n```\n\n```python\n  # tennis.py\n\n  class Game(object):\n    def __init__(self, player1, player2):\n      pass\n\n    def score(self):\n      return (0, 0)\n```\n\nRun the spec file and enjoy that all tests are green!\n\n```\n  $ pipenv run mamba tennis_spec.py\n\n  .\n\n  1 examples ran in 0.0022 seconds\n```\n\n## Settings\n\nMamba provides a way to configuration using `spec/spec_helper.py` or `specs/spec_helper.py`\nThis module function is read after parsing arguments so configure function overrides settings\n\nA sample config file :\n\n```python\ndef configure(settings):\n  # settings.slow_test_threshold = 0.075\n  # settings.enable_code_coverage = False\n  # settings.code_coverage_file = '.coverage'\n  settings.format = 'documentation'\n  # settings.no_color = False\n  # settings.tags = None\n\n```\n## Official Manual\n\nYou can read more features about mamba in its [official manual](https://mamba-bdd.readthedocs.io/en/latest/)\n\n## Contributors\n\nHere's a [list](https://github.com/nestorsalceda/mamba/graphs/contributors) of all the people who have contributed.\n\nI'm really grateful to each and every of them!\n\nIf you want to be one of them, fork [repository](http://github.com/nestorsalceda/mamba) and send a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnestorsalceda%2Fmamba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnestorsalceda%2Fmamba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnestorsalceda%2Fmamba/lists"}