INNER CODE UNIT · Python

TestNeedsTranslation

connectbot/connectbot · translations/test_translate.py:93

class TestNeedsTranslation:
    def test_missing_element_needs_translation(self):
        assert needs_translation(None) is True

    def test_machine_translated_true_is_skipped(self):
        elem = parse(
            f'<string xmlns:tools="{TOOLS_NS}" '
            f'tools:machine_translated="true" name="x">foo</string>'
        )
        assert needs_translation(elem) is False

    def test_human_translated_skipped(self):
        elem = parse('<string name="x">foo</string>')
        assert needs_translation(elem) is False

    def test_machine_translated_false_skipped(self):
        elem = parse(
            f'<string xmlns:tools="{TOOLS_NS}" '

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…