def test_simple_bold(self): text = '*hello*' _equals(get_text_parts(text), (('hello', 'bold'), ))
def test_link_with_data_both_sides(self): text = 'hello\n\n\nhttp://www.google.com world!\n' _equals(get_text_parts(text), (('hello\n\n\n', 'normal'), ('http://www.google.com', 'link'), (' world!\n', 'normal')))
def test_multiple_links(self): text = 'hello http://www.google.com world!\n other http://my.com' _equals(get_text_parts(text), (('hello ', 'normal'), ('http://www.google.com', 'link'), (' world!\n other ', 'normal'), ('http://my.com', 'link')))
def test_basic_link(self): text = 'http://www.google.com' _equals(get_text_parts(text), ((text, 'link'), ))
def test_basic_file(self): text = 'file://my/file' _equals(get_text_parts(text), ((text, 'link'), ))
def test_file_name_with_underscores(self): text = 'some data and then path that should not be converted My_file_name and some more text.\n' _equals(get_text_parts(text), ((text, 'normal'), ))
def test_basic_link(self): text = 'http://www.google.com' _equals(get_text_parts(text), ((text, 'link'),))
def test_two_italics(self): text = 'some _hello_ other _bold_\n' _equals(get_text_parts(text), (('some', 'normal'), (' hello ', 'italic'), ('other', 'normal'), (' bold\n', 'italic')))
def test_two_bolds(self): text = 'some *hello* other *bold*\n' _equals(get_text_parts(text), (('some', 'normal'), (' hello ', 'bold'), ('other', 'normal'), (' bold\n', 'bold')))
def test_basic_file(self): text = 'file://my/file' _equals(get_text_parts(text), ((text, 'link'),))
def test_performance(self): starttime = time.time() _equals(get_text_parts(long_message), ((long_message, 'normal'), )) self.assertTrue(time.time() - starttime < 2)
def test_basic(self): text = 'hello' _equals(get_text_parts(text), ((text, 'normal'), ))
def test_basic(self): text = 'hello' _equals(get_text_parts(text), ((text, 'normal'),))