diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-06-09 11:59:41 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-06-09 11:59:41 +0100 |
commit | 7ce156c74927ae99d9f824ce91183b126f7549e9 (patch) | |
tree | e14d5f37900befa07e3e186ba27a2d5f6af56f5e /yarnlib/block_parser_tests.py | |
parent | c7377df98cd57db2dccfd952288e14f5fa3695e0 (diff) | |
download | cmdtest-7ce156c74927ae99d9f824ce91183b126f7549e9.tar.gz |
Test and handle empty lines better
Diffstat (limited to 'yarnlib/block_parser_tests.py')
-rw-r--r-- | yarnlib/block_parser_tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yarnlib/block_parser_tests.py b/yarnlib/block_parser_tests.py index 1576950..3dc8111 100644 --- a/yarnlib/block_parser_tests.py +++ b/yarnlib/block_parser_tests.py @@ -52,8 +52,8 @@ class BlockParserTests(unittest.TestCase): self.assertEqual(self.parser.stories[0].name, 'foo bar') def test_handles_empty_line(self): - self.parser.parse_blocks(['']) - self.assertEqual(self.parser.stories, []) + self.parser.parse_blocks(['STORY foo\n\nGIVEN bar\nTHEN foobar']) + self.assertEqual(len(self.parser.stories), 1) def test_parses_implements_in_a_block_by_itself(self): self.parser.parse_blocks(['IMPLEMENTS GIVEN foo\ntrue']) |