Ejemplo n.º 1
0
def clean_workspace_and_get_default_script_file():
    # Make sure things are clean.
    default_script_file = mlab.MatlabInputSpec().script_file
    if os.path.exists(default_script_file):
        os.remove(
            default_script_file
        )  # raise Exception('Default script file needed for tests; please remove %s!' % default_script_file)
    return default_script_file
Ejemplo n.º 2
0
def test_mlab_inputspec():
    default_script_file = clean_workspace_and_get_default_script_file()
    spec = mlab.MatlabInputSpec()
    for k in ['paths', 'script', 'nosplash', 'mfile', 'logfile', 'script_file',
              'nodesktop']:
        yield assert_true, k in spec.copyable_trait_names()
    yield assert_true, spec.nodesktop
    yield assert_true, spec.nosplash
    yield assert_true, spec.mfile
    yield assert_equal, spec.script_file, default_script_file
Ejemplo n.º 3
0
def test_mlab_inputspec():
    spec = mlab.MatlabInputSpec()
    for k in [
            'paths', 'script', 'nosplash', 'mfile', 'logfile', 'script_file',
            'nodesktop'
    ]:
        yield assert_true, k in spec.copyable_trait_names()
    yield assert_true, spec.nodesktop
    yield assert_true, spec.nosplash
    yield assert_true, spec.mfile
    yield assert_equal, spec.script_file, 'pyscript.m'
Ejemplo n.º 4
0
def test_mlab_inputspec():
    default_script_file = clean_workspace_and_get_default_script_file()
    spec = mlab.MatlabInputSpec()
    for k in [
            'paths', 'script', 'nosplash', 'mfile', 'logfile', 'script_file',
            'nodesktop'
    ]:
        assert k in spec.copyable_trait_names()
    assert spec.nodesktop
    assert spec.nosplash
    assert spec.mfile
    assert spec.script_file == default_script_file
Ejemplo n.º 5
0
def test_mlab_inputspec():
    default_script_file = clean_workspace_and_get_default_script_file()
    spec = mlab.MatlabInputSpec()
    for k in [
            "paths",
            "script",
            "nosplash",
            "mfile",
            "logfile",
            "script_file",
            "nodesktop",
    ]:
        assert k in spec.copyable_trait_names()
    assert spec.nodesktop
    assert spec.nosplash
    assert spec.mfile
    assert spec.script_file == default_script_file