#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ENGG1811 Week 4 test code to test my_max (different test cases) """ # The test inputs and expected output test_inputs = [[ 2, 5, 8], [ 2, 5, -8], [ 2, -5, 8], [ 2, -5, -8], [-2, 5, 8], [-2, 5, -8], [-2, -5, 8], [-2, -5, -8]] test_expected_outputs = [8,5,8,2,8,5,8,-2] # To carry out the test import my_max # The test file # Loop through all the tests for k in range(0,len(test_inputs)): test_input = test_inputs[k] test_output = my_max.my_max(test_input) if test_output == test_expected_outputs[k]: print('Test ',test_input,': Passed') else: print('Test ',test_input,': Failed')