
    hl                        S SK Jr  S SKrS SKJr  S SKJr  SSKJr  \" 5       r	\R                  S\R                  4S j5       r\R                  S\R                  4S	 j5       r\R                  S
\4S j5       r\R                  " SS9S
\4S j5       r\R                   R#                  \" 5       (       + SS9S
\S\4S j5       rg)    )PathN)	CliRunner)app   )has_gittmp_path_factoryc                 .    U R                  S5      nUS-  $ )Nprojectmktempr   bases     V/home/james-whalen/.local/lib/python3.13/site-packages/weasel/tests/cli/test_remote.pyproject_dirr      s     ""9-D)    c                 .    U R                  S5      nUS-  $ )Nremoter   r   s     r   
remote_urlr      s     ""8,D(?r   r   c                     SnSn[         R                  [        SSUSUS[        U 5      /5      nUR                  S:X  d   eU S-  R                  5       (       d   eg	)
zCloning shouldn't failz#https://github.com/explosion/weaselmainclonez--repoz--branchzweasel/tests/demo_projectr   project.ymlN)runnerinvoker   str	exit_codeexists)r   repobranchresults       r   r   r      sn     1DF]]'	
F q   -'//1111r   T)autousec                     [         R                  [        S[        U5      /5      n[	        UR
                  5        UR                  S:X  d   eUS-  R                  5       (       d   eg )Nassetsr   assets/README.md)r   r   r   r   printstdoutr   r   )r   r   r    s      r   r#   r#   1   sW    ]]33{+; <=F	&--q   ,,446666r   zgit not installed)reasonr   c                    [         R                  [        S[        U 5      /5      nUR                  S:X  d   eU S-  R                  5       (       d   e[         R                  [        SS[        U 5      /5      nUR                  S:X  d   e[        U S-  S5       nUR                  SU S	35        S S S 5        [         R                  [        S
S[        U 5      /5      nUR                  S:X  d   eU S-  R                  5         [         R                  [        SS[        U 5      /5      nUR                  S:X  d   eU S-  R                  5       (       d   eg ! , (       d  f       N= f)Nr#   r   r$   runprepr   az
remotes:
    default: 
pushdefaultzcorpus/stuff.txtpull)	r   r   r   r   r   r   openwriteunlink)r   r   r    project_files       r   test_remoter4   :   sE   ]]33{+; <=Fq   ,,446666]]3K0@ ABFq    
kM)3	/<6zl"EF 
0 ]]3C4D EFFq    %%--/]]3C4D EFFq   ,,446666 
0	/s   E
E#)pathlibr   pytesttyper.testingr   weaselr   test_cli_appr   r   fixtureTempPathFactoryr   r   r   r#   markskipifr4    r   r   <module>r?      s      #  !	 &"8"8   !7!7   2t 2 2* 7t 7 7 	M*=>7T 7t 7 ?7r   