Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

test_acis_power_cmds test should be updated to skip on GRETA #40

Open
jeanconn opened this issue Oct 9, 2018 · 4 comments
Open

test_acis_power_cmds test should be updated to skip on GRETA #40

jeanconn opened this issue Oct 9, 2018 · 4 comments

Comments

@jeanconn
Copy link
Contributor

jeanconn commented Oct 9, 2018

test_acis_power_cmds test should be updated to skip on GRETA (or use a SKA/data file)

>           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
@taldcroft
Copy link
Member

What is the failing test? I can't tell from the issue description.

@jeanconn
Copy link
Contributor Author

jeanconn commented Oct 9, 2018

I thought the test was called "get_globfiles"

@jeanconn
Copy link
Contributor Author

jeanconn commented Oct 9, 2018

Nevermind. I'll go run it again. I assume it is whatever test wants to use AUG0618.

@jeanconn jeanconn changed the title get_globfiles test should be updated to skip on GRETA test_acis_power_cmds test should be updated to skip on GRETA Oct 9, 2018
@jeanconn
Copy link
Contributor Author

jeanconn commented Oct 9, 2018

=================================== 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants