Re: [Tutor] Puzzling case of assertRaises not running properly

2016-12-30 Thread Steven D'Aprano
On Fri, Dec 30, 2016 at 09:51:46PM +, angela ebirim wrote: > class Bill(object): > >def tax(self, total): > tax = float(total * 0.05) > return round(tax, 2) > >def check_input(self, seat1, app1): > try: > seat1 = float(seat1) > app1 = float(app1) >

Re: [Tutor] Puzzling case of assertRaises not running properly

2016-12-30 Thread Martin A. Brown
Hello, Overall, I must say good work and your question was clear. >Learning about how to write tests in Python and have a query. Excellent! I will snip everything except where I think you should look... def check_input(self, seat1, app1): try: seat1 = float(seat1)

[Tutor] Puzzling case of assertRaises not running properly

2016-12-30 Thread angela ebirim
Hi, Learning about how to write tests in Python and have a query. *#bill.py* class Bill(object): def tax(self, total): tax = float(total * 0.05) return round(tax, 2) def check_input(self, seat1, app1): try: seat1 = float(seat1) app1 = float(app1) except