def test_initprof(simulation, j1713_profile):
    '\n    Test init_profile function.\n    '
    simulation.init_profile()
    with pytest.raises(NotImplementedError):

        def gprof(x, p0):
            return (p0[0] * np.exp(((- 0.5) * (((x - p0[1]) / p0[2]) ** 2))))
        simulation._profiles = gprof
        simulation.init_profile()
    simulation._profiles = [0.5, 0.5, 1.0]
    simulation.init_profile()
    simulation._profiles = j1713_profile
    simulation.init_profile()
    with pytest.raises(RuntimeError):
        simulation._profiles = [0.5, 0.5]
        simulation.init_profile()
    pr = DataProfile(j1713_profile, phases=None)
    print(type(pr), pr)
    simulation._profiles = pr
    simulation.init_profile()
Test init_profile function.
def test_initprof(simulation, j1713_profile):
    '\n    \n    '
    simulation.init_profile()
    with pytest.raises(NotImplementedError):

        def gprof(x, p0):
            return (p0[0] * np.exp(((- 0.5) * (((x - p0[1]) / p0[2]) ** 2))))
        simulation._profiles = gprof
        simulation.init_profile()
    simulation._profiles = [0.5, 0.5, 1.0]
    simulation.init_profile()
    simulation._profiles = j1713_profile
    simulation.init_profile()
    with pytest.raises(RuntimeError):
        simulation._profiles = [0.5, 0.5]
        simulation.init_profile()
    pr = DataProfile(j1713_profile, phases=None)
    print(type(pr), pr)
    simulation._profiles = pr
    simulation.init_profile()