def test_set_subtotal(self): det = Detail() try: gotError = 0 det.subtotal = 5 except TypeError: gotError = 1 assert gotError, \ "shouldn't be able to assign to detail.subtotal"