Skip to content

Commit

Permalink
Merge pull request #478 from Hedera-Lang-Learn/fix-failing-python
Browse files Browse the repository at this point in the history
Fix failing python tests
  • Loading branch information
arthurian authored Dec 6, 2022
2 parents 6ee471b + 408f62f commit 11cc88b
Show file tree
Hide file tree
Showing 4 changed files with 219 additions and 222 deletions.
2 changes: 1 addition & 1 deletion hedera/requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sentry-sdk~=1.3.1
rq~=1.9.0
wagtail~=2.14.1
django-lti-provider~=0.4.7
lac~=2.1.2
# lac~=2.1.2
pip-tools~=6.4.0
tqdm~=4.63.0
# Pinned protobuf to 3.20.1 because of LAC issue with protobuf 4.21.1
Expand Down
2 changes: 0 additions & 2 deletions hedera/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ jmespath==0.10.0
# botocore
l18n==2021.3
# via wagtail
lac==2.1.2
# via -r hedera/requirements/base.in
nameparser==1.1.1
# via django-lti-provider
numpy==1.21.6
Expand Down
26 changes: 13 additions & 13 deletions lemmatization/tests/test_lemmatizers.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
from django.test import SimpleTestCase, TransactionTestCase
from django.test import TransactionTestCase

from ..models import FormToLemma, Lemma
from ..services.chinese import ChineseService
from ..services.latin import LatinService


class ChineseServiceTests(SimpleTestCase):
def test_service(self):
"""
Lemmatization is simple: output is simply a list with the input as the only member;
the input is not transformed, nor any additional lemmata included.
"""
text_input = "月"
self.assertEqual(
ChineseService(lang="zho").lemmatize(text_input),
[text_input]
)
# Chinese language test commented out until support for this language is enabled again.
# class ChineseServiceTests(SimpleTestCase):
# def test_service(self):
# """
# Lemmatization is simple: output is simply a list with the input as the only member;
# the input is not transformed, nor any additional lemmata included.
# """
# text_input = "月"
# self.assertEqual(
# ChineseService(lang="zho").lemmatize(text_input),
# [text_input]
# )


class LatinServiceTests(TransactionTestCase):
Expand Down
Loading

0 comments on commit 11cc88b

Please sign in to comment.