Test Setup Failed
Push — master ( af1115...273b78 )
by Ken M.
57s
created

find_message()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
import re
2
3
4
def find_message(text):
5
    return ''.join(re.findall('[A-Z]', text))
6
7
8
if __name__ == '__main__':  # pragma: no cover
9
    # These "asserts" using only for self-checking and not necessary for
10
    # auto-testing
11
    assert find_message(
12
        u"How are you? Eh, ok. Low or Lower? Ohhh.") == "HELLO", "hello"
13
    assert find_message(u"hello world!") == "", "Nothing"
14
    assert find_message(u"HELLO WORLD!!!") == "HELLOWORLD", "Capitals"
15