diff options
Diffstat (limited to 'yarnlib/block_parser_tests.py')
-rw-r--r-- | yarnlib/block_parser_tests.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/yarnlib/block_parser_tests.py b/yarnlib/block_parser_tests.py index 0a1d441..7051e17 100644 --- a/yarnlib/block_parser_tests.py +++ b/yarnlib/block_parser_tests.py @@ -104,3 +104,21 @@ class BlockParserTests(unittest.TestCase): self.assertEqual(impls[1].regexp, 'bar') self.assertEqual(impls[1].shell, 'cat /dev/null') + def test_raises_error_for_implements_with_no_args(self): + self.assertRaises( + yarnlib.BlockError, + self.parser.parse_blocks, + ['IMPLEMENTS']) + + def test_raises_error_for_implements_with_one_args(self): + self.assertRaises( + yarnlib.BlockError, + self.parser.parse_blocks, + ['IMPLEMENTS GIVEN']) + + def test_raises_error_for_implements_with_first_args_not_a_keyword(self): + self.assertRaises( + yarnlib.BlockError, + self.parser.parse_blocks, + ['IMPLEMENTS foo']) + |