3
Yd#                 @   sb   d dl Z d dljjZd dljjZG dd dej	Z
G dd dej	ZG dd dejZdd	 ZdS )
    Nc               @   s(   e Zd ZejjddZejjddZdS )	InputSpecza random int)descN)__name__
__module____qualname__nibtraitsIntinput1Zinput2 r   r   [/var/www/html/virt/lib/python3.6/site-packages/nipype/pipeline/plugins/tests/test_linear.pyr      s   r   c               @   s    e Zd ZejjejjddZdS )
OutputSpecoutputs)r   N)r   r   r   r   r   Listr	   output1r   r   r   r   r      s   r   c               @   s$   e Zd ZeZeZdd Zdd ZdS )LinearTestInterfacec             C   s
   d|_ |S )Nr   )
returncode)selfZruntimer   r   r   _run_interface   s    z"LinearTestInterface._run_interfacec             C   s    | j  j }d| jjg|d< |S )N   r   )Z_outputsgetinputsr
   )r   r   r   r   r   _list_outputs   s    z!LinearTestInterface._list_outputsN)	r   r   r   r   Z
input_specr   Zoutput_specr   r   r   r   r   r   r      s   r   c             C   s   | j   tjdd}tjt dd}tjt dgdd}|j||dgfg tj |_	d	|j
_|jd
d}dd |j D }t|j |jd }|jd}|d	d	gkstd S )Npipe)namemod1)	interfacer   r
   mod2)r   Z	iterfieldr   r   r   ZLinear)Zpluginc             S   s   g | ]}d j |j|jfqS ).)joinZ
_hierarchyr   ).0noder   r   r   
<listcomp>+   s    z&test_run_in_series.<locals>.<listcomp>z	pipe.mod1)r   r
   )chdirpeZWorkflowNoder   ZMapNodeconnectosgetcwdbase_dirr   r
   runZnodeslistindexZ
get_outputAssertionError)Ztmpdirr   r   r   Z	execgraphnamesr!   resultr   r   r   test_run_in_series   s    

r0   )r'   Znipype.interfaces.baseZ
interfacesbaser   Znipype.pipeline.engineZpipelineZenginer$   ZTraitedSpecr   r   ZBaseInterfacer   r0   r   r   r   r   <module>   s   