aboutsummaryrefslogtreecommitdiffstats
path: root/tests/spmd_test.py
diff options
context:
space:
mode:
authorMartin Vilcans <martin@librador.com>2012-01-31 23:35:25 +0100
committerMartin Vilcans <martin@librador.com>2012-01-31 23:42:56 +0100
commitf5ebe5fe5f7c86efc28e1ac4cf853d3c5750001a (patch)
tree9b4a9be7d3571ad297a0335fd860cef01d9594b6 /tests/spmd_test.py
parent888addaa73f9615103fc70edd1e9a027755647e3 (diff)
downloadscreenplain-f5ebe5fe5f7c86efc28e1ac4cf853d3c5750001a.tar.gz
Transitions no longer have to be followed by a scene heading.
Diffstat (limited to 'tests/spmd_test.py')
-rw-r--r--tests/spmd_test.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/spmd_test.py b/tests/spmd_test.py
index 34fddf7..aba2e84 100644
--- a/tests/spmd_test.py
+++ b/tests/spmd_test.py
@@ -190,7 +190,8 @@ class ParseTests(unittest2.TestCase):
]))
self.assertEquals([Action, Action, Slug], [type(p) for p in paras])
- def test_transition_must_be_followed_by_slug(self):
+ def test_transition_does_not_have_to_be_followed_by_slug(self):
+ # The "followed by slug" requirement is gone from the Jan 2012 spec
paras = list(parse([
'Bill lights a cigarette.',
'',
@@ -198,7 +199,10 @@ class ParseTests(unittest2.TestCase):
'',
'SOME GUY mowing the lawn.',
]))
- self.assertEquals([Action, Action, Action], [type(p) for p in paras])
+ self.assertEquals(
+ [Action, Transition, Action],
+ [type(p) for p in paras]
+ )
def test_greater_than_sign_means_transition(self):
paras = list(parse([
@@ -211,6 +215,16 @@ class ParseTests(unittest2.TestCase):
self.assertEquals([Action, Transition, Slug], [type(p) for p in paras])
self.assertEquals(plain('FADE OUT.'), paras[1].line)
+ def test_centered_text_is_not_parsed_as_transition(self):
+ paras = list(parse([
+ 'Bill blows out the match.',
+ '',
+ '> THE END. <',
+ '',
+ 'bye!'
+ ]))
+ self.assertEquals([Action, Action, Action], [type(p) for p in paras])
+
def test_transition_at_end(self):
paras = list(parse([
'They stroll hand in hand down the street.',