(file_path)
| 33 | |
| 34 | # 读取文件到内存 |
| 35 | def read_file_to_memory(file_path): |
| 36 | with open(file_path, 'r', encoding='utf-8') as f_in: |
| 37 | content = f_in.read() |
| 38 | virtual_file = io.StringIO(content) |
| 39 | lines = [line for line in virtual_file] |
| 40 | virtual_file.close() |
| 41 | return lines |
| 42 | |
| 43 | |
| 44 | # 比较提交记录 |
no outgoing calls
no test coverage detected