コード例 #1
0
ファイル: cat_tests.py プロジェクト: tresoldi/phyltr
def test_init():
    # Test defaults
    cat = Cat.init_from_args("")
    assert cat.burnin == 0
    assert cat.subsample == 1
    assert cat.annotations == True

    # Test burnin
    cat = Cat.init_from_args("--burnin 10")
    assert cat.burnin == 10

    # Test subsample
    cat = Cat.init_from_args("--subsample 10")
    assert cat.subsample == 10

    # Test no annotations
    cat = Cat.init_from_args("--no-annotations")
    assert cat.annotations == False
コード例 #2
0
ファイル: basic_tests.py プロジェクト: Anaphory/phyltr
def test_command_bad_args():
    with pytest.raises(SystemExit):
        run_command('sibling')
    with pytest.raises(SystemExit):
        _ = Cat.init_from_args("cat --foobar")
コード例 #3
0
def test_command_bad_args():
    cat = Cat.init_from_args("cat --foobar")