#NEWLINE# def test_io( self ) : #NEWLINE# #INDENT# m = MeanOpacities ( ) #NEWLINE# m . compute ( self . o , n_temp = 10 , temp_min = 1.0 , temp_max = 1000.0 ) #NEWLINE# f = virtual_file ( ) #NEWLINE# m . to_hdf5_group ( f ) #NEWLINE# m_new = MeanOpacities ( ) #NEWLINE# m_new . from_hdf5_group ( f ) #NEWLINE# assert_allclose ( m . temperature , m_new . temperature ) #NEWLINE# assert_allclose ( m . specific_energy , m_new . specific_energy ) #NEWLINE# assert_allclose ( m . chi_planck , m_new . chi_planck ) #NEWLINE# assert_allclose ( m . kappa_planck , m_new . kappa_planck ) #NEWLINE# assert_allclose ( m . chi_inv_planck , m_new . chi_inv_planck ) #NEWLINE# assert_allclose ( m . kappa_inv_planck , m_new . kappa_inv_planck ) #NEWLINE# assert_allclose ( m . chi_rosseland , m_new . chi_rosseland ) #NEWLINE# assert_allclose ( m . kappa_rosseland , m_new . kappa_rosseland ) #NEWLINE# assert ( m . hash ( ) == m_new . hash ( ) )