akuma ukpo wrote: > I am defining the function in one .py file and testing the function in > another .py file. > > this is my code for the test: > > def test_quantity_convert(self): > self.assertEqual(gallons_to_cups(0), 16) > self.assertEqual(gallons_to_cups(100), 1600) > > this is my code for the defined function: > > def gallons_to_cups(quant): > """ > Takes quantity 'quant' in Gallons and computes and > returns the equivalent Cup quantity > """ > return 16 * quant + 0 > > > what am i doing wrong?
This line in your test code is wrong: > self.assertEqual(gallons_to_cups(0), 16) By the way, adding 0 does not change the result here: > return 16 * quant + 0 _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
