示例#1
0
def test_morse_enc9():
    """
    Encoding test 9.

    Input: "wxln-ý"
    Output: ".-- -..- .-.. -. -....- -.--"
    """
    assert morse.morse_code("wxln-ý") == ".-- -..- .-.. -. -....- -.--"
示例#2
0
def test_morse_enc7():
    """
    Encoding test 7.

    Input: "áíéúů=?"
    Output: ".- .. . ..- ..- -...- ..--.."
    """
    assert morse.morse_code("áíéúů=?") == ".- .. . ..- ..- -...- ..--.."
示例#3
0
def test_morse_enc8():
    """
    Encoding test 8.

    Input: "ďťňó:@/"
    Output: "-.. - -. --- ---... .--.-. -..-."
    """
    assert morse.morse_code("ďťňó:@/") == "-.. - -. --- ---... .--.-. -..-."
示例#4
0
def test_morse_enc0():
    """
    Encoding test 0.

    Input: "Ahoj"
    Output: ".- .... --- .---"
    """
    assert morse.morse_code("Ahoj") == ".- .... --- .---"
示例#5
0
def test_morse_enc6():
    """
    Encoding test 6.

    Input: "ěščřž.,"
    Output: ". ... -.-. .-. --.. .-.-.- --..--"
    """
    assert morse.morse_code("ěščřž.,") == ". ... -.-. .-. --.. .-.-.- --..--"
示例#6
0
def test_morse_enc5():
    """
    Encoding test 5.

    Input: "56789"
    Output: "..... -.... --... ---.. ----."
    """
    assert morse.morse_code("56789") == "..... -.... --... ---.. ----."
示例#7
0
def test_morse_enc4():
    """
    Encoding test 4.

    Input: "01234"
    Output: "----- .---- ..--- ...-- ....-"
    """
    assert morse.morse_code("01234") == "----- .---- ..--- ...-- ....-"
示例#8
0
def test_morse_enc3():
    """
    Encoding test 3.

    Input: "opqrstuv"
    Output: "--- .--. --.- .-. ... - ..- ...-"
    """
    assert morse.morse_code("opqrstuv") == "--- .--. --.- .-. ... - ..- ...-"
示例#9
0
def test_morse_enc2():
    """
    Encoding test 2.

    Input: "abcdefgh"
    Output: ".- -... -.-. -.. . ..-. --. ...."
    """
    assert morse.morse_code("abcdefgh") == ".- -... -.-. -.. . ..-. --. ...."
示例#10
0
def test_morse_enc1():
    """
    Encoding test 1.

    Input: "Jak se mas"
    Output: ".--- .- -.- / ... . / -- .- ..."
    """
    assert morse.morse_code("Jak se mas") == ".--- .- -.- / ... . / -- .- ..."