diff options
author | Martin Vilcans <martin@librador.com> | 2011-11-26 22:32:37 +0100 |
---|---|---|
committer | Martin Vilcans <martin@librador.com> | 2011-11-26 22:32:37 +0100 |
commit | b8ba084fe1d976a4da7a3344dfdd17f7770d891b (patch) | |
tree | 070eb9379776ae81c5b3ac2812da141527bc1b1c /tests/richstring_test.py | |
parent | 2bfa3b3e77b0cbd8ad2db3dee52e66f7fde12a30 (diff) | |
download | screenplain-b8ba084fe1d976a4da7a3344dfdd17f7770d891b.tar.gz |
Some code style changes
Diffstat (limited to 'tests/richstring_test.py')
-rw-r--r-- | tests/richstring_test.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/richstring_test.py b/tests/richstring_test.py index 2804ec2..7c04368 100644 --- a/tests/richstring_test.py +++ b/tests/richstring_test.py @@ -72,6 +72,7 @@ class RichStringTests(unittest2.TestCase): s.to_html() ) + class ParseEmphasisTests(unittest2.TestCase): def test_parse_without_emphasis(self): @@ -87,7 +88,7 @@ class ParseEmphasisTests(unittest2.TestCase): def test_parse_pre_and_postfix_and_bold(self): self.assertEquals( parse_emphasis('pre**Hello**post'), - plain('pre') + bold('Hello') + plain('post') + plain('pre') + bold('Hello') + plain('post') ) def test_parse_multiple_bold(self): @@ -155,16 +156,21 @@ class ParseEmphasisTests(unittest2.TestCase): def test_complicated(self): # As reported by Stu self.assertEquals( - parse_emphasis('You can _underline_ words, make them **bold** or *italic* or even ***bold italic.***'), + parse_emphasis( + 'You can _underline_ words, make them **bold** or *italic* ' + 'or even ***bold italic.***' + ), (plain('You can ') + underline('underline') + plain(' words, make them ') + bold('bold') + plain(' or ') + - italic('italic') + plain(' or even ') + (bold + italic)('bold italic.')) + italic('italic') + plain(' or even ') + + (bold + italic)('bold italic.')) ) def test_simplified_complicated(self): self.assertEquals( parse_emphasis('*italic* or even ***bold italic.***'), - italic('italic') + plain(' or even ') + (bold + italic)('bold italic.') + italic('italic') + plain(' or even ') + + (bold + italic)('bold italic.') ) def test_two_italic_should_not_create_one_long_italic_string(self): |