Exemple #1
0
def test_good_args1():
    sys.argv = 'run_all.py -s mean'.split()
    args = arg_parse_all()
    assert args.stat == ['mean']
    assert args.stat != ['min']
    assert args.stat != ['max']
Exemple #2
0
def test_arg_parse_batch_2():
    sys.argv = 'run_chunk.py -s min -m BCC/bcc-csm1-1'.split()
    args = arg_parse_all()
    assert args.ensemble == defaults.ensembles
    assert args.var_id == defaults.variables
Exemple #3
0
def test_arg_parse_all_2():
    sys.argv = 'run_chunk.py -s min'.split()
    arg_parse_all()
Exemple #4
0
def test_arg_parse_all_3():
    sys.argv = 'run_chunk.py -s min'.split()
    args = arg_parse_all()
    assert args.model == defaults.models
    assert args.ensemble == defaults.ensembles
    assert args.var_id == defaults.variables
Exemple #5
0
def test_arg_parse_all_1():
    try:
        sys.argv = 'run_chunk.py'.split()
        arg_parse_all()
    except SystemExit as exc:
        pass