Example #1
0
def test_load_script_block_from_string():
    script = ScriptTool.from_string(
        """#!/bin/bash
#Simple tool
#
#Usage: simple [-i <input>]
cat ${input}
        """)
    assert script is not None
Example #2
0
def test_tool_script_setup_block_call(funcname):
    script = ScriptTool.from_string(
        """#!/bin/bash
#Simple tool
#
#%%begin setup

assert '%s' in locals(), "Injected function %s not found"

#%%end
echo
""" % (funcname, funcname))
    assert script is not None
    script.setup()
Example #3
0
def test_tool_script_and_injected_attributes(funcname):
    script = ScriptTool.from_string(
        """#!/bin/bash
#Simple tool
#
#%%begin validate

assert '%s' in locals(), "Injected function %s not found"

#%%end
echo
""" % (funcname, funcname))
    assert script is not None
    p = jip.Pipeline()
    p.run(script)
    p.expand()
    jip.create_jobs(p)