Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Nov 7, 2023
1 parent 8b059df commit cd5ec90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions glossary_resources/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from daras_ai.image_input import storage_blob_for
from daras_ai_v2.crypto import get_random_doc_id
from glossary_resources.models import GlossaryResource
from tests.test_translation import test_run_google_translate_one
from tests.test_translation import _test_run_google_translate_one

GLOSSARY = [
{
Expand Down Expand Up @@ -77,12 +77,12 @@ def glossary_url():
def test_run_google_translate_glossary(glossary_url, threadpool_subtest):
for text, expected, expected_with_glossary in TRANSLATION_TESTS_GLOSSARY:
threadpool_subtest(
test_run_google_translate_one,
_test_run_google_translate_one,
text,
expected,
)
threadpool_subtest(
test_run_google_translate_one,
_test_run_google_translate_one,
text,
expected_with_glossary,
glossary_url=glossary_url,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@

def test_run_google_translate(threadpool_subtest):
for text, expected in TRANSLATION_TESTS:
threadpool_subtest(test_run_google_translate_one, text, expected)
threadpool_subtest(_test_run_google_translate_one, text, expected)


def test_run_google_translate_one(
def _test_run_google_translate_one(
text: str, expected: str, glossary_url=None, target_lang="en"
):
actual = run_google_translate([text], target_lang, glossary_url=glossary_url)[0]
Expand Down

0 comments on commit cd5ec90

Please sign in to comment.