-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
57 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Tests for `chi_pet` package.""" | ||
|
||
import argparse | ||
from pathlib import Path | ||
import pytest | ||
import sys | ||
|
||
from unittest import mock | ||
from chi_pet.chi_parse import parse_chi_options | ||
|
||
# @pytest.mark.parametrize("command,arg_dict", [ | ||
# ('create', 'value1'), | ||
# ('run', 'value2'), | ||
# # Add more tuples for more test cases | ||
# ]) | ||
|
||
|
||
def test_chi_create_argument_parsing(): | ||
# Setup | ||
sys.argv = ['chi', 'create', 'param1.yaml', | ||
'param2.yaml', '-a', 'args.yaml'] | ||
# Test | ||
opts = parse_chi_options() | ||
# Assert | ||
assert opts.command == 'create' | ||
for pf in sys.argv[2:4]: | ||
assert Path(pf) in opts.param_files | ||
|
||
|
||
def test_chi_run_argument_parsing(): | ||
# Setup | ||
sys.argv = ['chi', 'run', '-a', 'args.yaml'] | ||
opts = parse_chi_options() | ||
assert opts.args_file == Path('args.yaml') |
This file was deleted.
Oops, something went wrong.