1
1
mirror of https://github.com/kanaka/mal.git synced 2024-08-17 01:30:26 +03:00

Respect platform dependent newline when reading test files

This commit is contained in:
Chien-Yu Lin 2023-07-12 00:13:47 +08:00
parent dc8a9b4307
commit 1b8c360f35

View File

@ -240,7 +240,7 @@ class Runner():
class TestReader:
def __init__(self, test_file):
self.line_num = 0
f = open(test_file, newline='') if IS_PY_3 else open(test_file)
f = open(test_file)
self.data = f.read().split('\n')
self.soft = False
self.deferrable = False