o
    rri'	                     @   sD   d dl mZ d dlmZmZ ddlmZ ddlmZ dZ	dd Z
dS )	   )SubmitRules)Shepherd	_JobArray   )	mock_shep)get_mainNc                 C   sd  t  # t| }t|}| }t }|g }|jd u s J |t||g |jd us0J |jj	dks8J |
||| |  |jj	dksKJ |j}d|_|
||| |  |jj	dksdJ |jdkskJ |d}|j|jksxJ |jj	dksJ |d}|j|jksJ |d}|d u sJ d|j_d|_|
||| |jj	dksJ d|_|
||| |  |jj	dksJ d|j_d|_d|_|
||| |  |jj	dksJ d|_|
||| |  |jj	d	ksJ d|j_|d
g}|
||| |  |jjjdksJ |jj sJ W d    d S 1 s+w   Y  d S )N0T1	CANCELLED2FAILEDF	COMPLETED3z--a=56code)r   r   r   get_slurm_configr   get_sheep_from_argvjob_submitr   job_idmaybe_submit_lazycommitreplace_stateget_sheep_from_job_idxpretryreplace_donedoragit_savecode_foldernameexists)tmpdirmainshepherdslurmrulessheepold_jobsheep2 r*   H/home/ubuntu/.local/lib/python3.10/site-packages/dora/tests/test_shep.py	test_shep   sf   




$r,   )confr   shepr   r   	fake_shepr   	test_mainr   _retr,   r*   r*   r*   r+   <module>   s   