import os import math filename = 'week_09_files/efternavne.csv' if not os.path.isfile(filename): print('Test for Surname Percentage failed because filename could not be found.') print('This does not indicate anything about the correctness of your code.') print('Please open the correct folder in VSCode.') exit(1) from surname_percentage import surname_percentage returned = surname_percentage(filename, 'Olsen') expected = 1.048343921554977 if not math.isclose(returned, expected): print('Test for Surname Percentage failed because returned was:') print(repr(returned)) print('instead of:') print(repr(expected)) else: print('Test for Surname Percentage passed')