Make test_file_jpeg compatible with Python 3