sn-translator/sn_translator/test_api.py

12 lines
239 B
Python

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