def test_load_cube_from_file_OSError(self, galaxy): cube = Cube(filename=galaxy.cubepath) cube.filename = 'hola.fits' with pytest.raises((IOError, OSError)) as ee: cube._load_cube_from_file() assert 'filename {0} cannot be found'.format(cube.filename) in str( ee.value)
def test_load_cube_from_file_with_data(self, galaxy): cube = Cube(filename=galaxy.cubepath) cube._load_cube_from_file(data=cube.data)