def main(): """ Calls the TEST functions in this module. """ run_test_sum_of_digits() run_test_digits_in_cube() run_test_digits_in_power() run_test_fancy_sums_of_digits() m4t_tester.main()
def main(): """ Calls the TEST functions in this module. """ run_test_sum_of_digits() run_test_digits_in_cube() run_test_digits_in_power() run_test_fancy_sums_of_digits() # ------------------------------------------------------------------------- # DONE: 9. DO THIS LAST! # -- Uncomment the line of code below to run the main function # in m4t_tester.py (do not make changes to it). # It runs OUR tests on your code. # -- Check to see whether all test cases indicate they # "COMPLETED SUCCESSFULLY!" # -- If your code fails any of OUR tests but passes YOUR tests, # then you are likely not TESTING the methods correctly. # ** Ask a TA or your professor for help in that case. ** # ------------------------------------------------------------------------- m4t_tester.main()
run_test_fancy_sums_of_digits() # ------------------------------------------------------------------------- # TODO: 9. DO THIS LAST! # -- Uncomment the line of code below to run the main function # in m4t_tester.py (do not make changes to it). # It runs OUR tests on your code. # -- Check to see whether all test cases indicate they # "COMPLETED SUCCESSFULLY!" # -- If your code fails any of OUR tests but passes YOUR tests, # then you are likely not TESTING the methods correctly. # ** Ask a TA or your professor for help in that case. ** # ------------------------------------------------------------------------- m4t_tester.main() def run_test_sum_of_digits(): """ Tests the sum_of_digits function. """ # ------------------------------------------------------------------------- # DONE: 2. Implement this TEST function, as follows: # # Step 1: This TEST function tests the sum_of_digits function. # So read the doc-string of the sum_of_digits function # defined below. Be sure that you understand from the # doc-string what the sum_of_digits function SHOULD return. # # Step 2: Pick a test case: a number that you could send as # an actual argument to the sum_of_digits function. # - For example, you could pick the test case 826.