Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add quality regression test #146

Merged
merged 5 commits into from
May 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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