Ejemplo n.º 1
0
def test_noun_word():
    ans = (['The capital and largest city of France.'])
    assert translate("Paris") == ans
Ejemplo n.º 2
0
def translate():
    Text_dict.delete("1.40", END)
    c = app1.translate(e3.get())
    if type(c) == str:
        Text_dict.insert(END, c)
    e3.delete("0", END)
Ejemplo n.º 3
0
def test_word_nonlist():
    ans = [
        'The science that deals with concepts such as quantity, structure, space and change.'
    ]
    assert translate("mathematics") == ans
Ejemplo n.º 4
0
def test_word_in_dict():
    assert translate("rain") == ([
        'Precipitation in the form of liquid water drops with diameters greater than 0.5 millimetres.',
        'To fall from the clouds in drops of water.'
    ])
Ejemplo n.º 5
0
def test_space_word():
    ans = "The word doesn't exist. Please double check it."
    assert translate(" ") == ans
Ejemplo n.º 6
0
def test_word_uppercase():
    ans = ([
        'Precipitation in the form of liquid water drops with diameters greater than 0.5 millimetres.',
        'To fall from the clouds in drops of water.'
    ])
    assert translate("RAIN") == ans
Ejemplo n.º 7
0
def test_word_not_in_dict():
    ans = "The word doesn't exist. Please double check it."
    assert translate("dddd") == ans