sn-translator/sn_translator/test_api.py

15 lines
299 B
Python
Raw Permalink Normal View History

import pytest
from api import translate
@pytest.mark.parametrize(
"q,trans,source,target",
[
("hi there\n", "hola.\n", "en", "es"),
("привет", "hi", "auto", "en")
]
)
def test_translate(q, trans, source, target):
assert translate(q, source, target) == trans