def int_check(): while True: error = "Please enter integer that is 13 or more." try: response = int(input("Enter an integer:")) # checks that the number is more than / equal to 13 if response < 13: print(error) else: return response except ValueError: print(error) # Automated testing is below in the form (test_case, expected_value) to_test = [ ("yes", "yes"), ("Y", "yes"), ("No", "no"), ("N", "no"), ("YeS", "yes"), ("Maybe", "invalid"), ] # run tests! for item in to_test: # retrieve test case and expected value case = item[0] expected = item[1] # get actual value (ie: test ticket function) actual = string_checker(case, ["yes", "no"]) # compare actual and expected and output pass / fail if actual == expected: print(f" ✅✅✅Passed! Case: {case}, expected: {expected}, received: {actual} ✅✅✅") else: print(f"❌❌❌ Failed! Case: {case}, expected: {expected}, received: {actual} ❌❌❌")