BDD doesn't require that we use any particular tool. Instead, it's more focused on the approach to testing. That is why it's possible to using Python
doctests to write BDD test scenarios.
Doctests aren't restricted to the module's code. With this recipe, we will explore creating independent text files to run through Python's doctest library.
If this is
doctest, why wasn't it included in the previous chapter's recipes? Because the context of writing up a set of tests in separate test document fits more naturally into the philosophy of BDD than with testable
docstrings that are available for introspection when working with a library.
For this recipe, we will be using the shopping cart application shown ...