diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-01-30 14:25:01 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-01-30 14:25:01 +0100 |
commit | 475f75c747b3fe2d0646f6b6d2e05b38bf5e0d22 (patch) | |
tree | 533bc200464824aedb528646b690ea36f8ae0d19 /tests | |
parent | a4a42ca95685887f2a84d0d767981428f1676c6b (diff) | |
download | clufter-475f75c747b3fe2d0646f6b6d2e05b38bf5e0d22.tar.gz clufter-475f75c747b3fe2d0646f6b6d2e05b38bf5e0d22.tar.xz clufter-475f75c747b3fe2d0646f6b6d2e05b38bf5e0d22.zip |
tests: command: add a tested case
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/command.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/command.py b/tests/command.py index 32382a2..981f106 100644 --- a/tests/command.py +++ b/tests/command.py @@ -26,7 +26,7 @@ from clufter.utils import apply_preserving_depth, \ class ChainResolve(unittest.TestCase): - def testShapeMatch(self): + def testShapeAndProtocolMatch(self): filters = dict( ccs2ccsflat=ccs2ccsflat(ccs, ccsflat), @@ -44,9 +44,14 @@ class ChainResolve(unittest.TestCase): ('ccsflat2pcs', 'ccs2coroxml', 'ccs2coroxml')) def cmd_chain_nonmatch_02(input='.in', output='.out', coro='.coro'): return ('file', input), (('file', output), ('file', coro)) + # malformed protocol name + @Command.deco('ccs2ccsflat', ('ccsflat2pcs', 'ccs2coroxml')) + def cmd_chain_nonmatch_03(input='.in', output='.out', coro='.coro'): + return ('file', input), (('file', output), ('life', coro)) cmd_classes = (cmd_chain_match, cmd_chain_nonmatch_01, - cmd_chain_nonmatch_02) + cmd_chain_nonmatch_02, + cmd_chain_nonmatch_03) cmd_names = map(lambda x: x.name, cmd_classes) commands = {} for cmd_cls, cmd_name in zip(cmd_classes, cmd_names): |