text: # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
  from ....testing import assert_equal
  from ..tensors import GenerateDirections
  
  
  def test_GenerateDirections_inputs():
      input_map = dict(args=dict(argstr='%s',
      ),
      display_debug=dict(argstr='-debug',
      ),
      display_info=dict(argstr='-info',
      ),
      environ=dict(nohash=True,
      usedefault=True,
      ),
      ignore_exception=dict(nohash=True,
      usedefault=True,
      ),
      niter=dict(argstr='-niter %s',
      ),
      num_dirs=dict(argstr='%s',
      mandatory=True,
      position=-2,
      ),
      out_file=dict(argstr='%s',
      hash_files=False,
      name_source=[u'num_dirs'],
      name_template='directions_%d.txt',
      position=-1,
      ),
      power=dict(argstr='-power %s',
      ),
      quiet_display=dict(argstr='-quiet',
      ),
      terminal_output=dict(nohash=True,
      ),
      )
      inputs = GenerateDirections.input_spec()
  
      for key, metadata in list(input_map.items()):
          for metakey, value in list(metadata.items()):
              yield assert_equal, getattr(inputs.traits()[key], metakey), value
  
  
  def test_GenerateDirections_outputs():
      output_map = dict(out_file=dict(),
      )
      outputs = GenerateDirections.output_spec()
  
      for key, metadata in list(output_map.items()):
          for metakey, value in list(metadata.items()):
              yield assert_equal, getattr(outputs.traits()[key], metakey), value
  