aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Vilcans <martin@librador.com>2011-11-26 22:32:37 +0100
committerMartin Vilcans <martin@librador.com>2011-11-26 22:32:37 +0100
commitb8ba084fe1d976a4da7a3344dfdd17f7770d891b (patch)
tree070eb9379776ae81c5b3ac2812da141527bc1b1c /tests
parent2bfa3b3e77b0cbd8ad2db3dee52e66f7fde12a30 (diff)
downloadscreenplain-b8ba084fe1d976a4da7a3344dfdd17f7770d891b.tar.gz
Some code style changes
Diffstat (limited to 'tests')
-rw-r--r--tests/fdx_test.py4
-rw-r--r--tests/richstring_test.py14
-rw-r--r--tests/spmd_test.py1
3 files changed, 13 insertions, 6 deletions
diff --git a/tests/fdx_test.py b/tests/fdx_test.py
index 1e2c743..c9cd387 100644
--- a/tests/fdx_test.py
+++ b/tests/fdx_test.py
@@ -35,7 +35,7 @@ class OutputTests(unittest2.TestCase):
)
def test_several_styles(self):
- rich = bold('outer') + (bold + italic)('inner') + bold('outer')
+ rich = bold('outer') + (bold + italic)('inner') + bold('outer')
write_text(self.out, rich, False)
self.assertEqual(
self.out.getvalue(),
@@ -45,7 +45,7 @@ class OutputTests(unittest2.TestCase):
)
def test_write_text_adds_line_break_if_requested(self):
- rich = bold('outer') + (bold + italic)('inner') + bold('outer')
+ rich = bold('outer') + (bold + italic)('inner') + bold('outer')
write_text(self.out, rich, True)
self.assertEqual(
self.out.getvalue(),
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):
diff --git a/tests/spmd_test.py b/tests/spmd_test.py
index ee4cd19..61a54ec 100644
--- a/tests/spmd_test.py
+++ b/tests/spmd_test.py
@@ -3,6 +3,7 @@ from screenplain.parsers.spmd import parse
from screenplain.types import Slug, Action, Dialog, DualDialog, Transition
from screenplain.richstring import plain
+
class ParseTests(unittest2.TestCase):
# A Scene Heading, or "slugline," is any line that has a blank