def test_expand_brief_hash(self): """Basic case for expanding hash sign""" dictionary = Dictionary() result = dictionary.expand_brief("#") self.check_strings(result, '#') result = dictionary.encode_brief(result) self.check_strings(result, '#')
def test_expand_brief_star(self): """Basic case for expanding star""" dictionary = Dictionary() result = dictionary.expand_brief("*") self.check_strings(result, '*') result = dictionary.encode_brief('*') self.check_strings(result, '*')
def test_expand_brief_mix_2(self): """Basic case for expanding a brief from the both hands""" dictionary = Dictionary() result = dictionary.expand_brief("TKOPBT") self.check_strings(result, "T-K-O--P-B-T") result = dictionary.encode_brief(result) self.check_strings(result, 'TKOpbt')
def test_expand_brief_mix(self): """Basic case for expanding a brief from the both hands""" dictionary = Dictionary() result = dictionary.expand_brief("WAUL") self.check_strings(result, "W-A--U-L") result = dictionary.encode_brief(result) self.check_strings(result, 'WAul')
def test_expand_brief_left(self): """Basic case for expanding a brief from the left hand""" dictionary = Dictionary() result = dictionary.expand_brief("TK") self.check_strings(result, 'T-K-') result = dictionary.encode_brief(result) self.check_strings(result, 'TK')
def test_expand_brief_right_implicit(self): """Basic case for expanding a brief from the right hand, implicit""" dictionary = Dictionary() result = dictionary.expand_brief("EU") self.check_strings(result, "-E-U") result = dictionary.encode_brief(result) self.check_strings(result, 'eu')
def test_expand_brief_all(self): """Basic case for expanding a brief from everything""" dictionary = Dictionary() result = dictionary.expand_brief("#STKPWHRAO*EUFRPBLGTSDZ") self.check_strings(result, "#S-T-K-P-W-H-R-A-O-*-E-U-F-R-P-B-L-G-T-S-D-Z") result = dictionary.encode_brief(result) self.check_strings(result, "#STKPWHRAO*eufrpblgtsdz")