def test_madeline_run(ped):
    output = madeline.run(ped, exe=MADELINE_EXE)
    assert output

    # test with missing executable
    with pytest.raises(MadelineExecutableNotFoundError):
        madeline.run(ped, exe="/tmp/bin/madeline2NotHere")

    # fail to auto-find executable in $PATH
    with pytest.raises(MadelineExecutableNotFoundError):
        madeline.run(ped)
def test_madeline_run_one_individual():
    with open("tests/fixtures/family-one.ped") as handle:
        ped = FamilyParser(handle, family_type="alt")

    with pytest.raises(SinglePedigreeError):
        madeline.run(ped, exe=MADELINE_EXE)
示例#3
0
def run_madeline(mip_case, madeline_exe):
    """Run and process madeline."""
    external_individuals = madeline.external_ped(mip_case.ped.individuals)
    mip_case.ped.families[mip_case.family_id].individuals = external_individuals
    svg_content = madeline.run(mip_case.ped, exe=madeline_exe)
    return svg_content