Skip to content

Commit

Permalink
Set encoding
Browse files Browse the repository at this point in the history
Change-Id: I53a8b6821cb8244c34833e5b2c5bdcc32f6ae726
  • Loading branch information
tushuhei committed May 31, 2023
1 parent 1e8b8e0 commit c3b2929
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TestQuality(unittest.TestCase):
def test_ja(self) -> None:
parser = load_default_japanese_parser()
fp = os.path.join(os.path.dirname(__file__), 'quality', 'ja.tsv')
with open(fp) as f:
with open(fp, 'r', encoding=sys.getdefaultencoding()) as f:
data = [line.split('\t') for line in f.readlines() if line[0] != '#']
expected_sentences = [line[1].strip() for line in data if len(line) > 1]
for expected in expected_sentences:
Expand Down

0 comments on commit c3b2929

Please sign in to comment.