def test_tc(modelfile, distfile):
    with open(modelfile, "r") as modelfp:
        model = DDPModel()
        model.init_from(modelfp, ',')
        
    with open(distfile, "r") as distfp:
        dist = DistributionModel()
        dist.init_from(distfp, ',')

    output = StringIO.StringIO()

    dist.apply_as_distribution(model).write(output, ',')
    print output.getvalue()

    output.close()
def test_gtc(modelfile, distfile):
    with open(modelfile, "r") as modelfp:
        model = SplineModel()
        FeaturesInterpreter.init_from_feature_file(model, modelfp, ',', (SplineModel.neginf, SplineModel.posinf))
        
    with open(distfile, "r") as distfp:
        dist = DistributionModel()
        dist.init_from(distfp, ',')

    output = StringIO.StringIO()

    dist.apply_as_distribution(model).write(output, ',')
    print output.getvalue()

    output.close()