Ejemplo n.º 1
0
def test_create_binning_list():
    ins, outs, bins = mgr.create_binning_list(
        "test_create_binning_list", [binning.bins_nmuon, binning.bins_met_px])
    assert ins == ["NMuon", "MET_px"]
    assert outs == ["nmuon", "met_px"]
    assert len(bins) == 2
    assert bins[0] is None
Ejemplo n.º 2
0
def test_duplicate_out_error():
    name = "test_duplicate_out_error"
    with pytest.raises(mgr.BadBinnedDataframeConfig) as e:
        mgr.create_binning_list(name, [binning.bins_nmuon, binning.bins_nmuon])
    assert "repeat" in str(e) and name in str(e)