MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / test_invalid_translation_options

Function test_invalid_translation_options

python/tests/test_translator.py:410–417  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

408
409
410def test_invalid_translation_options():
411 translator = _get_transliterator()
412 with pytest.raises(ValueError, match="is greater than"):
413 translator.translate_batch(
414 [["آ", "ت", "ز", "م", "و", "ن"]],
415 min_decoding_length=10,
416 max_decoding_length=5,
417 )
418
419
420def test_invalid_translation_options_async():

Callers

nothing calls this directly

Calls 2

_get_transliteratorFunction · 0.85
translate_batchMethod · 0.45

Tested by

no test coverage detected