Open jeanconn opened 6 years ago
What is the failing test? I can't tell from the issue description.
I thought the test was called "get_globfiles"
Nevermind. I'll go run it again. I assume it is whatever test wants to use AUG0618.
=================================== FAILURES ===================================
_____________________________ test_acis_power_cmds _____________________________
def test_acis_power_cmds():
import Ska.DBI
all_off = decode_power("WSPOW00000")
assert all_off["ccd_count"] == 0
assert all_off["fep_count"] == 0
assert all_off["vid_board"] == 0
server = os.path.join(os.environ['SKA'], 'data', 'cmd_states', 'cmd_states.db3')
db = Ska.DBI.DBI(dbi="sqlite", server=server, user='aca_read', database='aca')
state0 = get_state0("2017:359:13:37:50", db=db)
> cmds = get_cmds("2017:359:13:37:50", "2017:360:00:46:00", db=db)
Chandra/cmd_states/tests/test_get_cmd_states.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Chandra/cmd_states/cmd_states.py:532: in get_cmds
'*.backstop'))[0]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fileglob = '/data/mpcrit1/mplogs/2018/AUG0618/oflsa/*.backstop', minfiles = 1
maxfiles = 1
def get_globfiles(fileglob, minfiles=1, maxfiles=1):
"""
Get file(s) matching ``fileglob``. If the number of matching
files is less than minfiles or more than maxfiles then an
exception is raised.
:param fileglob: Input file glob
:param minfiles: Minimum matching files (None => no minimum)
:param maxfiles: Maximum matching files (None => no maximum)
"""
files = glob.glob(fileglob)
nfiles = len(files)
if minfiles is not None and nfiles < minfiles:
> raise ValueError('At least %d file(s) required for %s but %d found' % (minfiles, fileglob, nfiles))
E ValueError: At least 1 file(s) required for /data/mpcrit1/mplogs/2018/AUG0618/oflsa/*.backstop but 0 found
../Ska.File-3.4.1-py3.6.egg/Ska/File.py:66: ValueError
test_acis_power_cmds test should be updated to skip on GRETA (or use a SKA/data file)