diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-06-09 12:04:54 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-06-09 12:04:54 +0100 |
commit | f11c5d87df20aa1b6b5c940844fa4e8cfab42b9e (patch) | |
tree | a4c2b583d2db54747eb7c02f56b67ee04a2011f3 | |
parent | 784e8f70e7c95c202937f0403600c44dafd029f6 (diff) | |
download | cmdtest-f11c5d87df20aa1b6b5c940844fa4e8cfab42b9e.tar.gz |
Add test for story step outside of story
-rw-r--r-- | yarnlib/block_parser_tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/yarnlib/block_parser_tests.py b/yarnlib/block_parser_tests.py index 45bfe67..77a96e1 100644 --- a/yarnlib/block_parser_tests.py +++ b/yarnlib/block_parser_tests.py @@ -61,6 +61,12 @@ class BlockParserTests(unittest.TestCase): self.parser.parse_blocks, ['STORY foo\nblah']) + def test_raises_error_for_step_outside_story(self): + self.assertRaises( + yarnlib.BlockError, + self.parser.parse_blocks, + ['GIVEN foo']) + def test_parses_implements_in_a_block_by_itself(self): self.parser.parse_blocks(['IMPLEMENTS GIVEN foo\ntrue']) impls = self.parser.implementations |