Exemple #1
0
def test_graphframe(calc_pi_callgrind_dot):
    """Sanity test a GraphFrame object with known data."""

    gf = GraphFrame()
    gf.from_gprof_dot(str(calc_pi_callgrind_dot))

    assert len(gf.dataframe.groupby('name')) == 105
Exemple #2
0
def test_graphframe(calc_pi_callgrind_dot):
    """Sanity test a GraphFrame object with known data."""
    gf = GraphFrame.from_gprof_dot(str(calc_pi_callgrind_dot))

    assert len(gf.dataframe.groupby("name")) == 105

    for col in gf.dataframe.columns:
        if col in ("time (inc)", "time"):
            assert gf.dataframe[col].dtype == np.float64
        elif col in ("name", "module", "node"):
            assert gf.dataframe[col].dtype == np.object