def test_string(self): with pytest.raises(AttributeError): str(translate.ITranslation()) # Add attributes manually translation = translate.ITranslation() translation.from_lang = "English" translation.to_lang = "Spanish" assert repr(translation) == "English -> Spanish"
def test_hypotheses(self): with pytest.raises(NotImplementedError): translate.ITranslation().hypotheses("this is some text")
def test_translate(self): with pytest.raises(NotImplementedError): translate.ITranslation().translate("some input")