Skip to content

Commit

Permalink
Use 'skipif' as 'skip' is only for pytest >= 2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopasra committed Apr 19, 2016
1 parent 643ffdb commit dde3b42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions megaradrp/core/tests/test_processing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import shutil
from tempfile import mkdtemp
import os

import astropy.io.fits as fits
import numpy as np
Expand Down Expand Up @@ -70,11 +71,12 @@ def test_trim_and_o_fail2():
assert excinfo.value.args[0] == "%s must be one if '11', '12', '21, '22'" % bins


@pytest.mark.skip(reason="no way of currently testing this without tar file")
@pytest.mark.skipif(not os.path.exists('master_weights_LCB_10img_1exp.tar'),
reason="no way of currently testing this without tar file")
def test_apextract_weights():
import tarfile

file_name='master_weights_LCB_10img_1exp.tar'
file_name = 'master_weights_LCB_10img_1exp.tar'

data = fits.getdata('fiberflat_frame.fits')
rss = apextract_weights(data, tarfile.open(file_name, 'r'))
Expand Down

0 comments on commit dde3b42

Please sign in to comment.