def test_findthebiggest(): input_map = dict(args = dict(argstr='%s',), environ = dict(), in_files = dict(argstr='%s',mandatory=True,), out_file = dict(argstr='%s',), output_type = dict(), ) instance = fsl.FindTheBiggest() for key, metadata in input_map.items(): for metakey, value in metadata.items(): yield assert_equal, getattr(instance.inputs.traits()[key], metakey), value
def test_Find_the_biggest(): fbg = fsl.FindTheBiggest() # make sure command gets called yield assert_equal, fbg.cmd, 'find_the_biggest' # test raising error with mandatory args absent yield assert_raises, ValueError, fbg.run # .inputs based parameters setting fbg.inputs.infiles = 'seed*' fbg.inputs.outfile = 'fbgfile' yield assert_equal, fbg.cmdline, 'find_the_biggest seed* fbgfile' fbg2 = fsl.FindTheBiggest(infiles='seed2*', outfile='fbgfile2') yield assert_equal, fbg2.cmdline, 'find_the_biggest seed2* fbgfile2' # .run based parameters setting fbg3 = fsl.FindTheBiggest() results = fbg3.run(infiles='seed3', outfile='out3') yield assert_equal, results.runtime.cmdline, 'find_the_biggest seed3 out3'
def test_Find_the_biggest(): fbg = fsl.FindTheBiggest() # make sure command gets called assert fbg.cmd == 'find_the_biggest' # test raising error with mandatory args absent with pytest.raises(ValueError): fbg.run() # .inputs based parameters setting fbg.inputs.infiles = 'seed*' fbg.inputs.outfile = 'fbgfile' assert fbg.cmdline == 'find_the_biggest seed* fbgfile' fbg2 = fsl.FindTheBiggest(infiles='seed2*', outfile='fbgfile2') assert fbg2.cmdline == 'find_the_biggest seed2* fbgfile2' # .run based parameters setting fbg3 = fsl.FindTheBiggest() results = fbg3.run(infiles='seed3', outfile='out3') assert results.runtime.cmdline == 'find_the_biggest seed3 out3'
def test_Find_the_biggest(): fbg = fsl.FindTheBiggest() # make sure command gets called assert fbg.cmd == "find_the_biggest" # test raising error with mandatory args absent with pytest.raises(ValueError): fbg.run() # .inputs based parameters setting fbg.inputs.infiles = "seed*" fbg.inputs.outfile = "fbgfile" assert fbg.cmdline == "find_the_biggest seed* fbgfile" fbg2 = fsl.FindTheBiggest(infiles="seed2*", outfile="fbgfile2") assert fbg2.cmdline == "find_the_biggest seed2* fbgfile2" # .run based parameters setting fbg3 = fsl.FindTheBiggest() results = fbg3.run(infiles="seed3", outfile="out3") assert results.runtime.cmdline == "find_the_biggest seed3 out3"