Ejemplo n.º 1
0
def test_cmdline():
    from blimpy.waterfall import cmd_tool

    args = [voyager_h5, '-s', 'test.png']
    cmd_tool(args)

    args = [voyager_h5, '-i']
    cmd_tool(args)

    if os.path.exists('test.h5'):
        os.remove('test.h5')
        args = [voyager_h5, '-H', '-o', 'test.h5']
        cmd_tool(args)
        assert os.path.exists('test.h5')
        os.remove('test.h5')

    if os.path.exists('test.fil'):
        os.remove('test.fil')
        args = [voyager_h5, '-F', '-o', 'test.fil']
        cmd_tool(args)
        assert os.path.exists('test.fil')
        os.remove('test.fil')
Ejemplo n.º 2
0
def test_cmd_arguments():
    from blimpy.waterfall import cmd_tool

    args = [voyager_h5, '-H', '-F', '-o', 'test.fil']
    with pytest.raises(Warning):
        cmd_tool(args)