+
    3:jw  c                       ^ RI t^ RIHu Ht ^ RIt^ RIt^ RI	t	^ RI
t
^ RIHt ^ RIt]! ]4      P                  ^,          R,          R,          t]P"                  P%                  R]4      t]P"                  P)                  ]4      t]P,                  t]'       gv   RRR]P0                  ! 4       9   g   ]P2                  ! ]4      '       d   ]P4                  ! ]4      MRR	]P4                  ! ]4      /,          t]! ]P:                  ! ]4      4      hRt]P,                  P=                  ]4       R
 tRR lt R t!]PD                  PG                  RRRRR/R3RRRR/R3RR/R3RRRRRR/R3.4      R 4       t$R t%R t&R t'R# )    N)Pathtoolsztheme_factory.pytheme_factoryz*assert %(py2)s
{%(py2)s = %(py0)s.loader
}py0SPECpy2c                     \         P                  ! V R \         P                  4      ;_uu_ 4       pVP                  4        F  w  r4VP	                  W44       K  	  RRR4       R#   + '       g   i     R# ; i)wN)zipfileZipFileZIP_DEFLATEDitemswritestr)pathmembersarchivenamebodys   &&   K/home/user/tmp/united-pets-verifier-portability/tests/test_theme_factory.py	write_zipr      sL    	sG$8$8	9	9W!--/JDT( * 
:	9	9	9s   +A$$A5	c                 B    V R ,          p\        W! R2RV R2R/4       V# )z	theme.zipz
/style.csszTheme Name: Testz
/index.phpz<?php)r   )tmp_pathrootr   s   && r   	valid_zipr      s2    k!DdvZ(*<j>QSZ[\K    c                 8
   \        V R 4      pV R,          p\        P                  q3! W4      pR qTV8H  qf'       Eg   \        P                  ! RV3RWE34      RR\
        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRR\        P                  ! V4      RR\
        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRRR\
        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR	\        P                  ! V4      R
\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;p;reVR,          P                  R4       VR,          P                  R4       V R,          p	\        P                  q3! W)4      pR qTV8H  qf'       Eg   \        P                  ! RV3RWE34      RR\
        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRR\        P                  ! V4      RR\
        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRRR\
        P                  ! 4       9   g   \        P                  ! V	4      '       d   \        P                  ! V	4      MRR	\        P                  ! V4      R
\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;p;re\        P                  W)4       \        P                  q3! V	4      p
R qjV8H  q'       Eg3   \        P                  ! RV3RW34      RR\
        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRR\        P                  ! V4      RR\
        P                  ! 4       9   g   \        P                  ! V	4      '       d   \        P                  ! V	4      MRR\        P                  ! V
4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;p
;rR# )z
real-theme	publishedr   factoryr   py3sourcepy4	containerpy6py9zassert %(py11)spy11Nzresponse.mdzdone
zgeneration.jsonz{}
dist.zipdistpy5py8zassert %(py10)spy10==)z^%(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.install_archive
}(%(py3)s, %(py4)s)
} == %(py9)s)zY%(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.pack_theme
}(%(py3)s, %(py4)s)
} == %(py9)s)zU%(py5)s
{%(py5)s = %(py2)s
{%(py2)s = %(py0)s.inspect_archive
}(%(py3)s)
} == %(py8)s)r   r   install_archive
@pytest_ar_call_reprcompare@py_builtinslocals_should_repr_global_name	_safereprAssertionError_format_explanation
write_text
pack_themeauditinspect_archive)r   r   r!   @py_assert1@py_assert5@py_assert8@py_assert7@py_format10@py_format12r&   @py_assert4@py_assert6@py_format9@py_format11s   &             r   &test_install_pack_and_audit_round_triprC      s   x.F;&I""E"65EEEEEEE5EEEEEE7EEEE7EEE"EEEEEE6EEEE6EEEEEEE9EEEE9EEE5EEEEEEEEEEE**84""..v6j D>i.>,>,>>>>>.>>>>>>7>>>>7>>>>>>>>>i>>>>i>>>>>>>>>>>>>>.>>>,>>>>>>>>MM)"""8"4(8L8L88888(888888788887888"888888488884888(888L88888888r   zmembers,matchz../style.cssxtheme/index.phpzunsafe ZIP pathzone/style.cssztwo/index.phpzexactly one roottheme/style.cssmissingztheme/STYLE.CSS	duplicatec                     V R ,          p\        W14       \        P                  ! \        P                  VR7      ;_uu_ 4        \        P                  V4       RRR4       R#   + '       g   i     R# ; i)bad.zipmatchN)r   pytestraisesr   FactoryErrorr8   )r   r   rL   r   s   &&& r   test_rejects_malformed_archivesrP   )   sJ     iDd	w++5	9	9% 
:	9	9	9s   A##A4	c                 ,   V R ,          p\         P                  ! VR4      ;_uu_ 4       pVP                  RR4       VP                  RR4       \         P                  ! R4      p\        P
                  R,          ^,          Vn        VP                  VR4       RRR4       \        P                  ! \        P                  R	R
7      ;_uu_ 4        \        P                  V4       RRR4       R#   + '       g   i     L^; i  + '       g   i     R# ; i)rJ   r	   rF   rD   rE   z
theme/linki  targetNsymlinkrK   )r
   r   r   ZipInfostatS_IFLNKexternal_attrrM   rN   r   rO   r8   )r   r   r   links   &   r   test_rejects_symlinkrY   9   s    iD	s	#	#w*C0*C0|,"llU2r9x( 
$ 
w++9	=	=% 
>	= 
$	# 
>	=	=s   A0C/D/C?	D	c                 >   V R ,          pVP                  4        \        V4      pV R,          pVP                  \        P                  ! R\        V4      ./4      4       \        P                  qD! W14      qRP                  qf! 4       quV8H  q'       Eg   \        P                  ! RV3RWW34      RR\        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRR\        P                  ! V4      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRRR \        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR R	\        P                  ! V4      R
R\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          p	RRV	/,          p
\        \        P                   ! V
4      4      hR;p;p;p;rg\        V R4      pVP                  \        P                  ! R\        V4      ./4      4       \"        P$                  ! \        P&                  RR7      ;_uu_ 4        \        P                  W14       RRR4       R#   + '       g   i     R# ; i)outputzresult.jsonfilesr   r   r   r   resultr    r"   r(   	generatedr)   py12zassert %(py14)spy14Notherzescaped outputrK   r*   )z%(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.generated_zip
}(%(py3)s, %(py4)s)
} == %(py12)s
{%(py12)s = %(py10)s
{%(py10)s = %(py8)s.resolve
}()
})mkdirr   r5   jsondumpsstrr   generated_zipresolver-   r.   r/   r0   r1   r2   r3   r4   rM   rN   rO   )r   r[   r^   r]   r9   r:   @py_assert9@py_assert11r<   @py_format13@py_format15outsides   &           r   *test_result_requires_one_zip_inside_outputrm   E   s    F
LLN&!I%F
djj'C	N+;!<=>  G 0G4E4EG4E4GG4GGGGGG0GGGGGG7GGGG7GGG GGGGGGGGGGGGGGGGGGGGGGGG0GGGGGGIGGGGIGGG4EGGG4GGGGGGGGG'*G
djj'CL>!:;<	w++3C	D	Df- 
E	D	D	Ds   +LL	c                 V   \        V 4      pV R ,          p\        P                  W4       VR,          P                  R4       \        P
                  ! \        P                  RR7      ;_uu_ 4        \        P                  W R,          4       RRR4       R#   + '       g   i     R# ; i)r   zunexpected.txtrD   z!one root plus generation metadatarK   r%   N)r   r   r,   r5   rM   rN   rO   r6   )r   r   r!   s   &  r   +test_pack_rejects_unexpected_container_filero   S   ss    x F;&IF.!!--c2	w++3V	W	W9&;< 
X	W	W	Ws   0BB(	)theme)(builtinsr/   _pytest.assertion.rewrite	assertionrewriter-   importlib.util	importlibrc   rU   r
   pathlibr   rM   __file__parentsMODULE_PATHutilspec_from_file_locationr   module_from_specr   loaderr9   r0   r1   r2   @py_format3r3   r4   exec_moduler   r   rC   markparametrizerP   rY   rm   ro    r   r   <module>r      sL           8n$$Q''14FF~~--o{K
..
)
)$
/{{ {     t   t   {          )
9 
#0#	68IJ
3	57IJ
S	!9-
S"3S:KS	QS^_	&&	&.=r   