Question: Use the function named lbs_to_stones provided below (no changes required) Use unittest to test this function (required 'import' statement provided) Define a class Tests(unittest.TestCase) Define

Use the function named lbs_to_stones provided below (no changes required)

Use unittest to test this function (required 'import' statement provided)

Define a class Tests(unittest.TestCase)

Define a test method named test_lbs_to_stones(self) that contains to assertion tests: 4.1 TEST1: Use assertEqual to test if lbs_to_stones(196) is equal to 14 4.2 TEST2: Use assertEqual to test if lbs_to_stones(140) is equal to 11

RUN CELL containing: if name == 'main' ...* code to invoke the unit tests (code provided)

# DO NOT MODIFY! -- PROVIDED CODE """ Function that needs to be unit tested """ def lbs_to_stones(lbs): return lbs/14

import unittest

# INSERT YOUR CODE HERE class Tests(unittest.TestCase): def test_lbs_to_stones(self): self.assertEqual('foo'.upper(), 'FOO')

# DO NOT MODIFY! print("QUESTION 3 - ANSWERS")

# PROVIDED CODE - to call your unittest code if __name__ == '__main__': unittest.main(argv=['first-arg-is-ignored'], exit=False)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!