MCPcopy Create free account
hub / github.com/DeepL/deepl-python / test_glossary_entries

Function test_glossary_entries

tests/test_cli.py:396–407  ·  view source on GitHub ↗
(translator, runner, glossary_manager)

Source from the content-addressed store, hash-verified

394
395
396def test_glossary_entries(translator, runner, glossary_manager):
397 entries = {"Hallo": "Hello", "Maler": "Artist"}
398 with glossary_manager(entries=entries) as created_glossary:
399 created_id = created_glossary.glossary_id
400 result = runner.invoke(
401 main_function, f"-vv glossary entries {created_id}"
402 )
403 assert (
404 result.exit_code == 0
405 ), f"exit: {result.exit_code}\n {result.output}"
406 for source, target in entries.items():
407 assert f"{source}\t{target}" in result.output
408
409
410def test_glossary_delete(translator, runner, glossary_manager):

Callers

nothing calls this directly

Calls 1

glossary_managerFunction · 0.85

Tested by

no test coverage detected