Skip to content

Commit

Permalink
Merge pull request #225 from vaibhav4595/master
Browse files Browse the repository at this point in the history
Test added in test_atomic.py
  • Loading branch information
wkerzendorf committed Mar 5, 2015
2 parents 0931f4c + 5c76492 commit 1cfef3b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tardis/tests/test_atomic.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ def test_ionization_h5_readin():
hi_ionization = data['ionization_energy'][0]
testing.assert_almost_equal(hi_ionization, 13.59844, decimal=4)

def test_levels_h5_readin():
data = atomic.read_levels_data(atomic.default_atom_h5_path)
assert data['atomic_number'][4] == 14
assert data['ion_number'][4] == 0
assert data['level_number'][4] == 4
si_energy = data['energy'][4]
testing.assert_almost_equal(si_energy, 1.90865, decimal=4)
assert data['g'][4] == 1
assert data['metastable'][4] == False


def test_atom_levels():
atom_data = atomic.AtomData.from_hdf5(atomic.default_atom_h5_path)
Expand Down

0 comments on commit 1cfef3b

Please sign in to comment.