There are other options for doing Gherkin-based BDD in Python. We’ve listed the main ones below and why we feel you’re better off using behave. Obviously this comes from our point of view and you may disagree. That’s cool. We’re not worried whichever way you go.
This page may be out of date as the projects mentioned will almost certainly change over time. If anything on this page is out of date, please contact us.
You can actually use Cucumber to run test code written in Python. It uses rubypython to fire up a Python interpreter inside the Ruby process though and this can be somewhat brittle. Obviously we prefer to use something written in Python but if you’ve got an existing workflow based around Cucumber and you have code in multiple languages, Cucumber may be the one for you.
Lettuce is similar to behave in that it’s a fairly straight port of the basic functionality of Cucumber. The main differences with behave are:
The issues we had with Lettuce that stopped us using it were:
Freshen is a plugin for nose that implements a Gherkin-style language with Python step definitions. The main differences with behave are:
The issues we had with Freshen that suppoed us using it were:
The above being said the integration with nose means that you gain things like JUnit output and coverage analysis fairly easily. This may or may not be an issue for you. Behave will be adding JUnit output soon and we will more than likely forget to remove this sentence when we do.