Skip to content

Commit c8bf0c3

Browse files
committed
add tests/parsing/utils
1 parent d4b3f29 commit c8bf0c3

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎paths_cli/tests/parsing/utils.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from paths_cli.parsing.core import Parser
2+
3+
def mock_parser(parser_name, type_dispatch=None, named_objs=None):
4+
if type_dispatch is None:
5+
type_dispatch = {}
6+
parser = Parser(type_dispatch, parser_name)
7+
if named_objs is not None:
8+
parser.named_objs = named_objs
9+
return parser

0 commit comments

Comments
 (0)