
    mi'	                     B    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 Z
y)   )SubmitRules)Shepherd	_JobArray   )	mock_shep)get_mainNc                 8   t               5  t        |       }t        |      }|j                         }t	               }|j                  g       }|j                  J |j                  t        ||g             |j                  J |j                  j                  dk(  sJ |j                  |||       |j                          |j                  j                  dk(  sJ |j                  }d|_        |j                  |||       |j                          |j                  j                  dk(  sJ |j                  dk(  sJ |j                  d      }|j                  |j                  k(  sJ |j                  j                  dk(  sJ |j                  d      }|j                  |j                  k(  sJ |j                  d      }|J d|j                  _        d|_        |j                  |||       |j                  j                  dk(  sJ d|_        |j                  |||       |j                          |j                  j                  dk(  sJ d|j                  _        d|_        d|_        |j                  |||       |j                          |j                  j                  dk(  sJ d|_        |j                  |||       |j                          |j                  j                  d	k(  sJ d|j$                  _        |j                  d
g      }|j                  |||       |j                          |j                  j(                  j*                  dk(  sJ |j                  j(                  j-                         sJ 	 d d d        y # 1 sw Y   y xY w)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sheep2s           N/var/www/stems/demucs_env/lib/python3.12/site-packages/dora/tests/test_shep.py	test_shepr-      s"   	 ;-D>%%',,R0yy   55'23yy$$$yy3&&&""5%7yy3&&&))""5%7yy3&&&~~,,,//4xx699$$$yy3&&&//4xx699$$$//4~~#		""5%7yy3&&&""5%7yy3&&&&		""5%7yy3&&&!""5%7yy3&&&!		,,hZ8""5%7xx##((F222xx##**,,,w;- ;- ;-s   M;NN)confr   shepr   r   	fake_shepr   	test_mainr   _retr-        r,   <module>r5      s     &   <-r4   