Python 3: ResourceWarning: unclosed file <_io.TextIOWrapper name='PATH_OF_FILE'
问题 When I run the test cases in python with "python normalizer/setup.py test " I am getting the below exception ResourceWarning: unclosed file <_io.TextIOWrapper name='/Users/workspace/aiworkspace/skillset-normalization-engine/normalizer/lib/resources/skills.taxonomy' mode='r' encoding='utf-8'> In code I am reading a big file like below: def read_data_from_file(input_file): current_dir = os.path.realpath( os.path.join(os.getcwd(), os.path.dirname(__file__))) file_full_path = current_dir+input