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