Example #1
0
def xpp_check(tmp_path, ode_id, Nall=0, Nerr=0, Nwarn=0):
    sbml_file = tmp_path / f"{ode_id}.xml"
    xpp_file = DATA_DIR / "xpp" / f"{ode_id}.ode"
    xpp.xpp2sbml(xpp_file=xpp_file, sbml_file=sbml_file)
    vresults = validate_sbml(sbml_file, units_consistency=False)
    assert vresults.all_count == Nall
    assert vresults.error_count == Nerr
    assert vresults.warning_count == Nwarn
Example #2
0
def _validate_file(sbmlpath, units_consistency=True, Nall=0):
    """Validate given SBML file.

    Helper function called by the other tests.

    :param sbmlpath:
    :param units_consistency:
    :return:
    """
    v_results = validate_sbml(sbmlpath, units_consistency=units_consistency)
    assert v_results
    assert Nall == v_results.all_count
Example #3
0
def test_check_sbml() -> None:
    vresults = validate_sbml(DEMO_SBML, units_consistency=True)
    assert vresults.is_perfect()
Example #4
0
def test_validate_sbml():
    vresults = validate_sbml(GALACTOSE_SINGLECELL_SBML, units_consistency=True)
    assert vresults.is_valid()