|
| 1 | +# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT |
| 2 | +from __future__ import unicode_literals |
| 3 | +from ..preprocess import Qwarp |
| 4 | + |
| 5 | + |
| 6 | +def test_Qwarp_inputs(): |
| 7 | + input_map = dict(Qfinal=dict(argstr='-Qfinal', |
| 8 | + ), |
| 9 | + Qonly=dict(argstr='-Qonly', |
| 10 | + ), |
| 11 | + allsave=dict(argstr='-allsave', |
| 12 | + xor=['nopadWARP', 'duplo', 'plusminus'], |
| 13 | + ), |
| 14 | + args=dict(argstr='%s', |
| 15 | + ), |
| 16 | + ballopt=dict(argstr='-ballopt', |
| 17 | + xor=['workhard', 'boxopt'], |
| 18 | + ), |
| 19 | + base_file=dict(argstr='-base %s', |
| 20 | + copyfile=False, |
| 21 | + mandatory=True, |
| 22 | + ), |
| 23 | + baxopt=dict(argstr='-boxopt', |
| 24 | + xor=['workhard', 'ballopt'], |
| 25 | + ), |
| 26 | + blur=dict(argstr='-blur %s', |
| 27 | + ), |
| 28 | + duplo=dict(argstr='-duplo', |
| 29 | + xor=['gridlist', 'maxlev', 'inilev', 'iniwarp', 'plusminus', 'allsave'], |
| 30 | + ), |
| 31 | + emask=dict(argstr='-emask %s', |
| 32 | + copyfile=False, |
| 33 | + ), |
| 34 | + environ=dict(nohash=True, |
| 35 | + usedefault=True, |
| 36 | + ), |
| 37 | + expad=dict(argstr='-expad %d', |
| 38 | + xor=['nopadWARP'], |
| 39 | + ), |
| 40 | + gridlist=dict(argstr='-gridlist %s', |
| 41 | + copyfile=False, |
| 42 | + xor=['duplo', 'plusminus'], |
| 43 | + ), |
| 44 | + hel=dict(argstr='-hel', |
| 45 | + xor=['nmi', 'mi', 'lpc', 'lpa', 'pear'], |
| 46 | + ), |
| 47 | + ignore_exception=dict(nohash=True, |
| 48 | + usedefault=True, |
| 49 | + ), |
| 50 | + in_file=dict(argstr='-source %s', |
| 51 | + copyfile=False, |
| 52 | + mandatory=True, |
| 53 | + ), |
| 54 | + inilev=dict(argstr='-inlev %d', |
| 55 | + xor=['duplo'], |
| 56 | + ), |
| 57 | + iniwarp=dict(argstr='-iniwarp %s', |
| 58 | + xor=['duplo'], |
| 59 | + ), |
| 60 | + iwarp=dict(argstr='-iwarp', |
| 61 | + xor=['plusminus'], |
| 62 | + ), |
| 63 | + lpa=dict(argstr='-lpa', |
| 64 | + xor=['nmi', 'mi', 'lpc', 'hel', 'pear'], |
| 65 | + ), |
| 66 | + lpc=dict(argstr='-lpc', |
| 67 | + position=-2, |
| 68 | + xor=['nmi', 'mi', 'hel', 'lpa', 'pear'], |
| 69 | + ), |
| 70 | + maxlev=dict(argstr='-maxlev %d', |
| 71 | + position=-1, |
| 72 | + xor=['duplo'], |
| 73 | + ), |
| 74 | + mi=dict(argstr='-mi', |
| 75 | + xor=['mi', 'hel', 'lpc', 'lpa', 'pear'], |
| 76 | + ), |
| 77 | + minpatch=dict(argstr='-minpatch %d', |
| 78 | + ), |
| 79 | + nmi=dict(argstr='-nmi', |
| 80 | + xor=['nmi', 'hel', 'lpc', 'lpa', 'pear'], |
| 81 | + ), |
| 82 | + noXdis=dict(argstr='-noXdis', |
| 83 | + ), |
| 84 | + noYdis=dict(argstr='-noYdis', |
| 85 | + ), |
| 86 | + noZdis=dict(argstr='-noZdis', |
| 87 | + ), |
| 88 | + noneg=dict(argstr='-noneg', |
| 89 | + ), |
| 90 | + nopad=dict(argstr='-nopad', |
| 91 | + ), |
| 92 | + nopadWARP=dict(argstr='-nopadWARP', |
| 93 | + xor=['allsave', 'expad'], |
| 94 | + ), |
| 95 | + nopenalty=dict(argstr='-nopenalty', |
| 96 | + ), |
| 97 | + nowarp=dict(argstr='-nowarp', |
| 98 | + ), |
| 99 | + noweight=dict(argstr='-noweight', |
| 100 | + ), |
| 101 | + out_file=dict(argstr='-prefix %s', |
| 102 | + genfile=True, |
| 103 | + name_source=['in_file'], |
| 104 | + name_template='%s_QW', |
| 105 | + ), |
| 106 | + out_weight_file=dict(argstr='-wtprefix %s', |
| 107 | + ), |
| 108 | + outputtype=dict(), |
| 109 | + overwrite=dict(argstr='-overwrite', |
| 110 | + ), |
| 111 | + pblur=dict(argstr='-pblur %s', |
| 112 | + ), |
| 113 | + pear=dict(argstr='-pear', |
| 114 | + ), |
| 115 | + penfac=dict(argstr='-penfac %f', |
| 116 | + ), |
| 117 | + plusminus=dict(argstr='-plusminus', |
| 118 | + xor=['duplo', 'allsave', 'iwarp'], |
| 119 | + ), |
| 120 | + quiet=dict(argstr='-quiet', |
| 121 | + xor=['verb'], |
| 122 | + ), |
| 123 | + resample=dict(argstr='-resample', |
| 124 | + ), |
| 125 | + terminal_output=dict(nohash=True, |
| 126 | + ), |
| 127 | + verb=dict(argstr='-verb', |
| 128 | + xor=['quiet'], |
| 129 | + ), |
| 130 | + wball=dict(argstr='-wball %s', |
| 131 | + ), |
| 132 | + weight=dict(argstr='-weight %s', |
| 133 | + ), |
| 134 | + wmask=dict(argstr='-wpass %s %f', |
| 135 | + ), |
| 136 | + workhard=dict(argstr='-workhard', |
| 137 | + xor=['boxopt', 'ballopt'], |
| 138 | + ), |
| 139 | + ) |
| 140 | + inputs = Qwarp.input_spec() |
| 141 | + |
| 142 | + for key, metadata in list(input_map.items()): |
| 143 | + for metakey, value in list(metadata.items()): |
| 144 | + assert getattr(inputs.traits()[key], metakey) == value |
| 145 | + |
| 146 | + |
| 147 | +def test_Qwarp_outputs(): |
| 148 | + output_map = dict(base_warp=dict(), |
| 149 | + source_warp=dict(), |
| 150 | + warped_base=dict(), |
| 151 | + warped_source=dict(), |
| 152 | + weights=dict(), |
| 153 | + ) |
| 154 | + outputs = Qwarp.output_spec() |
| 155 | + |
| 156 | + for key, metadata in list(output_map.items()): |
| 157 | + for metakey, value in list(metadata.items()): |
| 158 | + assert getattr(outputs.traits()[key], metakey) == value |
0 commit comments