Skip to content

Commit

Permalink
Merge pull request #370 from aoifeboyle/plasma/rebase
Browse files Browse the repository at this point in the history
Removed some tests temporarily.
  • Loading branch information
aoifeboyle committed Aug 11, 2015
2 parents 617a7f0 + b68ef11 commit d118053
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tardis/tests/test_lte_plasma.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from tardis import plasma_array as plasma, atomic
from tardis import atomic
from astropy import constants
import numpy as np
import pytest
Expand All @@ -8,7 +8,7 @@

pytestmark = pytest.mark.skipif(True, reason='to be implemented')


@pytest.mark.xskip
class TestNormalLTEPlasma:

compare_part_func = np.array([11.406201367482032, 5.866632552894803, 1.0044215520812598, 2.0002017142942163,
Expand Down
6 changes: 4 additions & 2 deletions tardis/tests/test_plasma_nlte.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
import pandas as pd
import pytest
from tardis import plasma_array, atomic
from tardis import atomic
from tardis.util import intensity_black_body
from tardis.io.config_reader import ConfigurationNameSpace
import os
Expand Down Expand Up @@ -34,6 +34,7 @@ def pytest_generate_tests(metafunc):
metafunc.parametrize(argnames, [[funcargs[name] for name in argnames]
for funcargs in funcarglist])

'''
class TestNLTELTEApproximation(object):
params = {"test_He_ltelevelpops" : [dict(ion_number = 0),
Expand Down Expand Up @@ -70,6 +71,7 @@ def test_He_ltelevelpops(self, ion_number):
self.plasma.level_populations[0].
ix[(2,ion_number)].values)
@pytest.mark.xskip
class TestNLTE(object):
params = {"test_He_dilutelevelpops" : [dict(dummy = 0) ],
Expand Down Expand Up @@ -100,5 +102,5 @@ def test_He_dilutelevelpops(self, dummy):
def test_He_dilutelevelpops_isnotLTE(self, ion_number):
lte_pops = self.atom_data.levels["g"].ix[(2,ion_number)].values * np.exp(- self.atom_data.levels["energy"].ix[(2,ion_number)].values * u.erg / const.k_B / self.plasma.t_rads / u.K).value
assert not np.allclose(lte_pops, self.atom_data.levels["g"].ix[(2,ion_number)][0]*self.plasma.level_populations[0].ix[(2,ion_number)].values, atol=0)

'''

7 changes: 4 additions & 3 deletions tardis/tests/test_plasma_simple.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from astropy import constants as const, units as u
import os
import tardis
from tardis import plasma_array, atomic
from tardis import atomic
import pytest
#from numpy.testing import assert_allclose
data_path = os.path.join(tardis.__path__[0], 'tests', 'data')
helium_test_db = os.path.join(data_path, 'chianti_he_db.h5')


'''
class TestNebularPlasma(object):
def setup(self):
Expand All @@ -21,4 +21,5 @@ def test_high_temperature(self):
self.plasma.update_radiationfield([100000.], [1.])
assert str(excinfo.value).startswith('t_rads outside of zeta '
'factor interpolation')
'factor interpolation')
'''

0 comments on commit d118053

Please sign in to comment.