Ejemplo n.º 1
0
def test_reverse5():    
    word = ['', " "]
    word = reverse_words(word)
    assert word == ['', ' ']
Ejemplo n.º 2
0
def test_reverse2():
    word = ['adsf42234 09']
    word = reverse_words(word)
    assert word == ['09 adsf42234'] 
Ejemplo n.º 3
0
def test_reverse4():   
    word = ['234 safs2 23 a23 dsf', '234 987 is digit']
    word = reverse_words(word)
    assert word == ['dsf a23 23 safs2 234', 'digit is 987 234'] 
Ejemplo n.º 4
0
def test_reverse1():
    word = ['ABCDEFG', 'hello world']
    word = reverse_words(word)
    assert word == ['ABCDEFG', 'world hello']
Ejemplo n.º 5
0
def test_reverse(n, result):
    """Basic test cases for reverse_words function."""
    assert reverse_words(n) == result
Ejemplo n.º 6
0
def test_reverse3():
    word = ['uoy evol i', 'i love you']
    word = reverse_words(word)
    assert word == ['i evol uoy', 'you love i'] 
Ejemplo n.º 7
0
def test_contain_symbol():
    assert reverse_words(["Test for special symbol",
                          "OMG!!! FOR REAL???"]) == [
                              'symbol special for Test', 'REAL??? FOR OMG!!!'
                          ]
Ejemplo n.º 8
0
def test_example():
    assert reverse_words(["Hello World",
                          "I am here"]) == ['World Hello', 'here am I']
Ejemplo n.º 9
0
def test_contain_number():
    assert reverse_words(["Hello", "I am 21 years old"
                          ]) == ['Hello', 'old years 21 am I']
Ejemplo n.º 10
0
def test_three_letter_multiple():
    assert reverse_words(["Good Day m8", "How are you", "fine thank you"]) == [
        'm8 Day Good', 'you are How', 'you thank fine'
    ]
Ejemplo n.º 11
0
def test_three_letter():
    assert reverse_words(["I am Roger"]) == ['Roger am I']
Ejemplo n.º 12
0
def test_reverse_words1():
    words = ['Hello', 'World']
    expected = 'World Hello'
    actual = reverse_words(words)
    assert actual == expected
Ejemplo n.º 13
0
def test_reverse_words2():
    words = ['Hello', 'CodeEval']
    expected = 'CodeEval Hello'
    actual = reverse_words(words)
    assert actual == expected