(
translator, glossary_name, cleanup_matching_glossaries
)
| 63 | |
| 64 | |
| 65 | def test_glossary_create_invalid( |
| 66 | translator, glossary_name, cleanup_matching_glossaries |
| 67 | ): |
| 68 | try: |
| 69 | with pytest.raises(ValueError): |
| 70 | translator.create_glossary("", "EN", "DE", {"Hello": "Hallo"}) |
| 71 | with pytest.raises(deepl.DeepLException): |
| 72 | translator.create_glossary( |
| 73 | glossary_name, "EN", "XX", {"Hello": "Hallo"} |
| 74 | ) |
| 75 | with pytest.raises(ValueError): |
| 76 | translator.create_glossary(glossary_name, "EN", "DE", {}) |
| 77 | |
| 78 | finally: |
| 79 | cleanup_matching_glossaries( |
| 80 | lambda glossary: glossary.name == glossary_name |
| 81 | ) |
| 82 | |
| 83 | |
| 84 | def test_glossary_create_large(translator, glossary_manager): |
nothing calls this directly
no test coverage detected