Test methods should read like sentences and test cases should read like titles of chapters. This is part of BDD's philosophy of making tests easy-to-read for non-programmers.
For this recipe, we will be using the shopping cart application shown at the beginning of this chapter.
With the following steps, we will explore how to write a custom nose plugin that formats results as a BDD-style report.
recipe26.pyto contain our test cases.
import unittest from cart import * class CartWithOneItem(unittest.TestCase): def setUp(self): self.cart ...