Exemplo n.º 1
0
def test_from_json():
    # Tests from_dict too
    HIsys = LymanAbsSystem.from_json(data_path('HILya_abssys.json'))
    np.testing.assert_allclose(HIsys.zabs, 2.92939)
    # Tests ordering
    gensys = GenericAbsSystem.from_json(data_path('generic_abssys.json'))
    np.testing.assert_allclose(gensys._components[0].zcomp, 2.92939)
Exemplo n.º 2
0
def test_from_json():
    # Tests from_dict too
    HIsys = LymanAbsSystem.from_json(data_path('HILya_abssys.json'))
    np.testing.assert_allclose(HIsys.zabs, 2.92939)
    # Tests ordering
    gensys = GenericAbsSystem.from_json(data_path('generic_abssys.json'))
    np.testing.assert_allclose(gensys._components[0].zcomp, 2.92939)
Exemplo n.º 3
0
def test_write_json():
    HIsys = LymanAbsSystem.from_json(data_path('HILya_abssys.json'))
    HIsys.write_json()
Exemplo n.º 4
0
def test_write_json():
    HIsys = LymanAbsSystem.from_json(data_path('HILya_abssys.json'))
    HIsys.write_json()
Exemplo n.º 5
0
def test_from_json():
    # Tests from_dict too
    HIsys = LymanAbsSystem.from_json(data_path('HILya_abssys.json'))
    np.testing.assert_allclose(HIsys.zabs, 2.92939)