Ejemplo n.º 1
0
def test_disemvowel():
    tc_1 = remove_whitespaces("all those who believe in psychokinesis raise my hand")
    exp = "llthswhblvnpsychknssrsmyhnd", "aoeoeieeioieiaiea"
    act = disemvowel(tc_1)
    is_eq(act, exp)

    tc_2 = remove_whitespaces("did you hear about the excellent farmer who was outstanding in his field")
    exp = "ddyhrbtthxcllntfrmrwhwststndngnhsfld", "ioueaaoueeeeaeoaouaiiiie"
    act = disemvowel(tc_2)
    is_eq(act, exp)
Ejemplo n.º 2
0
def test_remove_whitespaces():
    tc_1 = "hello world"
    exp = "helloworld"
    act = remove_whitespaces(tc_1)
    is_eq(act, exp)

    tc_2 = "     c      "
    exp = "c"
    act = remove_whitespaces(tc_2)
    is_eq(act, exp)


    tc_3 = " "
    exp = ""
    act = remove_whitespaces(tc_3)
    is_eq(act, exp)