§
    UÂjá  ã                  óÆ   — d Z ddlmZ ddlZddlmc mZ ddl	Z	ddl
mZ ddlZddlmZmZmZmZmZmZmZmZmZ  G d„ d¦  «        Z G d„ d	¦  «        Z G d
„ d¦  «        ZdS )zõ
FreeExile Monster & Character Scaffolding Invariants & Cross-Platform Parity E2E Test Suite.
Verifies deep structural completeness, Apple Metal configs, Song Binh pairs,
strict normalized UV bounds [0.0, 1.0], and Cocos/WebApp manifest parity.
é    )ÚannotationsN)ÚPath)	Ú	REPO_ROOTÚCOCOS_MONSTERS_DIRÚCOCOS_CHARACTERS_DIRÚCOCOS_MANIFEST_PATHÚWEBAPP_VFX_DIRÚCANONICAL_MONSTER_GENERAÚCANONICAL_EXILE_CLASSESÚCANONICAL_DIRECTIONSÚvalidate_manifest_uv_boundsc                  ó:   — e Zd ZdZd
d„Zd
d„Zd
d„Zd
d„Zd
d„Zd	S )Ú!TestScaffoldingStructureAndConfigzGVerifies filesystem completeness and pipeline configuration invariants.ÚreturnÚNonec                ó¼  — t           dz  dz  dz  }|j        } |¦   «         }|s£t          j        d|› �¦  «        dz   dt	          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        ndt          j        |¦  «        t          j        |¦  «        dœz  }t          t          j	        |¦  «        ¦  «        ‚dx}}|j
        } |¦   «         }|j        }d	}||k    }|såt          j        d
|fd||f¦  «        dt	          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        ndt          j        |¦  «        t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        dœz  }t          j        d¦  «        dz   d|iz  }	t          t          j	        |	¦  «        ¦  «        ‚dx}x}x}x}}dS )z4Verifies generator script exists and has valid size.ÚtoolsÚasset_pipelinez&monster_character_pipeline_scaffold.pyzScaffolding script missing at úC
>assert %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.exists
}()
}Úscript_path©Úpy0Úpy2Úpy4Ni   )ú>=)z`%(py6)s
{%(py6)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.stat
}()
}.st_size
} >= %(py9)s©r   r   r   Úpy6Úpy9z%Scaffolding script too small or emptyz
>assert %(py11)sÚpy11)r   ÚexistsÚ
@pytest_arÚ_format_assertmsgÚ@py_builtinsÚlocalsÚ_should_repr_global_nameÚ	_safereprÚAssertionErrorÚ_format_explanationÚstatÚst_sizeÚ_call_reprcompare)
Úselfr   Ú@py_assert1Ú@py_assert3Ú@py_format5Ú@py_assert5Ú@py_assert8Ú@py_assert7Ú@py_format10Ú@py_format12s
             úLC:\Projects\FreeExile\tests\e2e_cocos\test_vfx_scaffolding_and_parity_e2e.pyÚ(test_scaffolding_generator_scripts_existzJTestScaffoldingStructureAndConfig.test_scaffolding_generator_scripts_exist   s  € å 'Ñ)Ð,<Ñ<Ð?gÑgˆØÔ!ÐSÐ!Ð!Ñ#Ô#ÐSÐ#ÐSÕSÔSÐ%SÀkÐ%SÐ%SÑSÔSÐSÑSÐSÕSÔSÑSÔSÐSÐSÕSÔSˆ{ÑSÔSÐSÕSÔSˆ{ÑSÔSÐSÐSÕSÔSÐ!ÑSÔSÕSÔSÐ#ÑSÔSÐSÐSÑSÐSÕSÕSÔSÐSÑSÔSÑSÔSÐSÐSÐSÐSÐSØÔÐZÐÐÑ!Ô!ÐZÐ!Ô)ÐZ¨TÐZÐ)¨TÒ1ÐZÐZÐZÕZÔZÐZÐZÐZÐZÐ)¨TÐZÑZÔZÐZÕZÔZÑZÔZÐZÐZÕZÔZˆ{ÑZÔZÐZÕZÔZˆ{ÑZÔZÐZÐZÕZÔZÐÑZÔZÕZÔZÐ!ÑZÔZÕZÔZÐ)ÑZÔZÕZÔZ¨TÑZÔZÐZÐZÑZÐZÕZÔZÐ3ZÑZÔZÐZÑZÐZÐZÐZÑZÐZÕZÕZÔZÐZÑZÔZÑZÔZÐZÐZÐZÐZÐZÐZÐZÐZÐZÐZÐZÐZÐZó    c                óD  — t           j        } |¦   «         }|s²t          j        dt           › �¦  «        dz   dt	          j        ¦   «         v st          j        t           ¦  «        rt          j        t           ¦  «        ndt          j        |¦  «        t          j        |¦  «        dœz  }t          t          j	        |¦  «        ¦  «        ‚dx}}t          D �]H}t           |z  }|j        } |¦   «         }|s£t          j        d|› �¦  «        dz   dt	          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        ndt          j        |¦  «        t          j        |¦  «        dœz  }t          t          j	        |¦  «        ¦  «        ‚dx}}||› d	�z  }|j        } |¦   «         }|s£t          j        d
|› �¦  «        dz   dt	          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        ndt          j        |¦  «        t          j        |¦  «        dœz  }t          t          j	        |¦  «        ¦  «        ‚dx}}|dz  }|j        } |¦   «         }|s£t          j        d|› �¦  «        dz   dt	          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        ndt          j        |¦  «        t          j        |¦  «        dœz  }t          t          j	        |¦  «        ¦  «        ‚dx}}�ŒJdS )zKVerifies all 10 monster archetypes exist with manifest and pipeline config.zMonsters directory missing: r   r   r   Nz%Monster archetype directory missing: úC
>assert %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.is_dir
}()
}Úg_dirú_anim_manifest.jsonzMonster manifest missing: Úmanifest_fileúpipeline_config.jsonz!Monster pipeline config missing: Úpipeline_file)r   r    r!   r"   r#   r$   r%   r&   r'   r(   r
   Úis_dir)r,   r-   r.   r/   Úgenusr:   r<   r>   s           r5   Ú;test_monster_archetypes_directory_and_manifest_completenessz]TestScaffoldingStructureAndConfig.test_monster_archetypes_directory_and_manifest_completeness#   s]  € å!Ô(Ð_Ð(Ð(Ñ*Ô*Ð_Ð*Ð_Õ_Ô_Ð,_ÕK]Ð,_Ð,_Ñ_Ô_Ð_Ñ_Ð_Õ_Ô_Ñ_Ô_Ð_Ð_Õ_Ô_Õ!Ñ_Ô_Ð_Õ_Ô_Õ!Ñ_Ô_Ð_Ð_Õ_Ô_Ð(Ñ_Ô_Õ_Ô_Ð*Ñ_Ô_Ð_Ð_Ñ_Ð_Õ_Õ_Ô_Ð_Ñ_Ô_Ñ_Ô_Ð_Ð_Ð_Ð_Ð_Ý-ð 	_ñ 	_ˆEÝ&¨Ñ.ˆEØ”<ÐR�<�<‘>”>ÐR�>ÐRÕRÔRÐ#RÈ5Ð#RÐ#RÑRÔRÐRÑRÐRÕRÔRÑRÔRÐRÐRÕRÔR�5ÑRÔRÐRÕRÔR�5ÑRÔRÐRÐRÕRÔR�<ÑRÔRÕRÔR�>ÑRÔRÐRÐRÑRÐRÕRÕRÔRÐRÑRÔRÑRÔRÐRÐRÐRÐRÐRØ! uÐ$AÐ$AÐ$AÑAˆMØ Ô'ÐWÐ'Ð'Ñ)Ô)ÐWÐ)ÐWÕWÔWÐ+WÈÐ+WÐ+WÑWÔWÐWÑWÐWÕWÔWÑWÔWÐWÐWÕWÔW�=ÑWÔWÐWÕWÔW�=ÑWÔWÐWÐWÕWÔWÐ'ÑWÔWÕWÔWÐ)ÑWÔWÐWÐWÑWÐWÕWÕWÔWÐWÑWÔWÑWÔWÐWÐWÐWÐWÐWØ!Ð$:Ñ:ˆMØ Ô'Ð^Ð'Ð'Ñ)Ô)Ð^Ð)Ð^Õ^Ô^Ð+^È}Ð+^Ð+^Ñ^Ô^Ð^Ñ^Ð^Õ^Ô^Ñ^Ô^Ð^Ð^Õ^Ô^�=Ñ^Ô^Ð^Õ^Ô^�=Ñ^Ô^Ð^Ð^Õ^Ô^Ð'Ñ^Ô^Õ^Ô^Ð)Ñ^Ô^Ð^Ð^Ñ^Ð^Õ^Õ^Ô^Ð^Ñ^Ô^Ñ^Ô^Ð^Ð^Ð^Ð^Ð^Ñ^ð	_ð 	_r7   c                óD  — t           j        } |¦   «         }|s²t          j        dt           › �¦  «        dz   dt	          j        ¦   «         v st          j        t           ¦  «        rt          j        t           ¦  «        ndt          j        |¦  «        t          j        |¦  «        dœz  }t          t          j	        |¦  «        ¦  «        ‚dx}}t          D �]H}t           |z  }|j        } |¦   «         }|s£t          j        d|› �¦  «        dz   dt	          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        ndt          j        |¦  «        t          j        |¦  «        dœz  }t          t          j	        |¦  «        ¦  «        ‚dx}}||› d	�z  }|j        } |¦   «         }|s£t          j        d
|› �¦  «        dz   dt	          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        ndt          j        |¦  «        t          j        |¦  «        dœz  }t          t          j	        |¦  «        ¦  «        ‚dx}}|dz  }|j        } |¦   «         }|s£t          j        d|› �¦  «        dz   dt	          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        ndt          j        |¦  «        t          j        |¦  «        dœz  }t          t          j	        |¦  «        ¦  «        ‚dx}}�ŒJdS )zIVerifies all 6 exile characters exist with manifest and Song Binh config.zCharacters directory missing: r   r   r   Nz#Character class directory missing: r9   Úc_dirr;   zCharacter manifest missing: r<   úsong_binh_config.jsonzSong Binh config missing: Úsong_binh_file)r   r    r!   r"   r#   r$   r%   r&   r'   r(   r   r?   )r,   r-   r.   r/   Úclass_idrC   r<   rE   s           r5   Ú9test_exile_characters_directory_and_manifest_completenessz[TestScaffoldingStructureAndConfig.test_exile_characters_directory_and_manifest_completeness.   s]  € å#Ô*ÐeÐ*Ð*Ñ,Ô,ÐeÐ,ÐeÕeÔeÐ.eÕOcÐ.eÐ.eÑeÔeÐeÑeÐeÕeÔeÑeÔeÐeÐeÕeÔeÕ#ÑeÔeÐeÕeÔeÕ#ÑeÔeÐeÐeÕeÔeÐ*ÑeÔeÕeÔeÐ,ÑeÔeÐeÐeÑeÐeÕeÕeÔeÐeÑeÔeÑeÔeÐeÐeÐeÐeÐeÝ/ð 	Zñ 	ZˆHÝ(¨8Ñ3ˆEØ”<ÐP�<�<‘>”>ÐP�>ÐPÕPÔPÐ#PÈÐ#PÐ#PÑPÔPÐPÑPÐPÕPÔPÑPÔPÐPÐPÕPÔP�5ÑPÔPÐPÕPÔP�5ÑPÔPÐPÐPÕPÔP�<ÑPÔPÕPÔP�>ÑPÔPÐPÐPÑPÐPÕPÕPÔPÐPÑPÔPÑPÔPÐPÐPÐPÐPÐPØ! xÐ$DÐ$DÐ$DÑDˆMØ Ô'ÐYÐ'Ð'Ñ)Ô)ÐYÐ)ÐYÕYÔYÐ+YÈ-Ð+YÐ+YÑYÔYÐYÑYÐYÕYÔYÑYÔYÐYÐYÕYÔY�=ÑYÔYÐYÕYÔY�=ÑYÔYÐYÐYÕYÔYÐ'ÑYÔYÕYÔYÐ)ÑYÔYÐYÐYÑYÐYÕYÕYÔYÐYÑYÔYÑYÔYÐYÐYÐYÐYÐYØ"Ð%<Ñ<ˆNØ!Ô(ÐYÐ(Ð(Ñ*Ô*ÐYÐ*ÐYÕYÔYÐ,YÈÐ,YÐ,YÑYÔYÐYÑYÐYÕYÔYÑYÔYÐYÐYÕYÔY�>ÑYÔYÐYÕYÔY�>ÑYÔYÐYÐYÕYÔYÐ(ÑYÔYÕYÔYÐ*ÑYÔYÐYÐYÑYÐYÕYÕYÔYÐYÑYÔYÑYÔYÐYÐYÐYÐYÐYÑYð	Zð 	Zr7   c           	     óˆ  — t           D �]8}t          |z  dz  }t          |dd¬¦  «        5 }t          j        |¦  «        }ddd¦  «         n# 1 swxY w Y   |j        }d} ||¦  «        }d}||k    }	|	sÐt          j        d|	fd	||f¦  «        d
t          j	        ¦   «         v st          j
        |¦  «        rt          j        |¦  «        nd
t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        dœz  }
dd|
iz  }t          t          j        |¦  «        ¦  «        ‚dx}x}x}x}	}|j        }d} ||¦  «        }d}||k    }	|	sÐt          j        d|	fd	||f¦  «        d
t          j	        ¦   «         v st          j
        |¦  «        rt          j        |¦  «        nd
t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        dœz  }
dd|
iz  }t          t          j        |¦  «        ¦  «        ‚dx}x}x}x}	}|j        }d} ||¦  «        }ddg}||k    }	|	sÐt          j        d|	fd	||f¦  «        d
t          j	        ¦   «         v st          j
        |¦  «        rt          j        |¦  «        nd
t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        dœz  }
dd|
iz  }t          t          j        |¦  «        ¦  «        ‚dx}x}x}x}	}�Œ:dS )zFVerifies monster pipeline configs declare Apple Metal ASTC 4x4 format.r=   Úrúutf-8©ÚencodingNÚhardware_compressionÚASTC_4x4©ú==©zI%(py6)s
{%(py6)s = %(py2)s
{%(py2)s = %(py0)s.get
}(%(py4)s)
} == %(py9)sÚcfgr   úassert %(py11)sr   Úapple_metal_pixel_formatÚMTLPixelFormatASTC_4x4_sRGBÚtarget_resolutioni   i    )r
   r   ÚopenÚjsonÚloadÚgetr!   r+   r#   r$   r%   r&   r'   r(   )r,   r@   Úcfg_pathÚfrR   r-   r.   r0   r1   r2   r3   r4   s               r5   Ú5test_monster_pipeline_configs_apple_metal_conformancezWTestScaffoldingStructureAndConfig.test_monster_pipeline_configs_apple_metal_conformance9   s  € å-ð 	@ñ 	@ˆEÝ)¨EÑ1Ð4JÑJˆHÝ�h ¨gÐ6Ñ6Ô6ð #¸!Ý”i ‘l”l�ð#ð #ð #ñ #ô #ð #ð #ð #ð #ð #ð #øøøð #ð #ð #ð #à”7Ð@Ð1Ð@�7�7Ð1Ñ2Ô2Ð@°jÐ@Ð2°jÒ@Ð@Ð@Ð@Õ@Ô@Ð@Ð@Ð@Ð@Ð2°jÐ@Ñ@Ô@Ð@Õ@Ô@Ñ@Ô@Ð@Ð@Õ@Ô@�3Ñ@Ô@Ð@Õ@Ô@�3Ñ@Ô@Ð@Ð@Õ@Ô@�7Ñ@Ô@Õ@Ô@Ð1Ñ@Ô@Õ@Ô@Ð2Ñ@Ô@Õ@Ô@°jÑ@Ô@Ð@Ð@Ñ@Ð@Ð@Ð@Ð@Ð@Ñ@Ð@Õ@Õ@Ô@Ð@Ñ@Ô@Ñ@Ô@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ð@Ø”7ÐWÐ5ÐW�7�7Ð5Ñ6Ô6ÐWÐ:WÐWÐ6Ð:WÒWÐWÐWÐWÕWÔWÐWÐWÐWÐWÐ6Ð:WÐWÑWÔWÐWÕWÔWÑWÔWÐWÐWÕWÔW�3ÑWÔWÐWÕWÔW�3ÑWÔWÐWÐWÕWÔW�7ÑWÔWÕWÔWÐ5ÑWÔWÕWÔWÐ6ÑWÔWÕWÔWÐ:WÑWÔWÐWÐWÑWÐWÐWÐWÐWÐWÑWÐWÕWÕWÔWÐWÑWÔWÑWÔWÐWÐWÐWÐWÐWÐWÐWÐWÐWÐWÐWØ”7Ð?Ð.Ð?�7�7Ð.Ñ/Ô/Ð?°D¸$°<Ð?Ð/°<Ò?Ð?Ð?Ð?Õ?Ô?Ð?Ð?Ð?Ð?Ð/°<Ð?Ñ?Ô?Ð?Õ?Ô?Ñ?Ô?Ð?Ð?Õ?Ô?�3Ñ?Ô?Ð?Õ?Ô?�3Ñ?Ô?Ð?Ð?Õ?Ô?�7Ñ?Ô?Õ?Ô?Ð.Ñ?Ô?Õ?Ô?Ð/Ñ?Ô?Õ?Ô?°<Ñ?Ô?Ð?Ð?Ñ?Ð?Ð?Ð?Ð?Ð?Ñ?Ð?Õ?Õ?Ô?Ð?Ñ?Ô?Ñ?Ô?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ð?Ñ?ð	@ð 	@ó   ªAÁA	ÁA	c                ó  — t           D �]}t          |z  dz  }t          |dd¬¦  «        5 }t          j        |¦  «        }ddd¦  «         n# 1 swxY w Y   g }d}||v }|}|rd}	|	|v }
|
}|�sXt          j        d|fd	||f¦  «        t          j        |¦  «        d
t          j	        ¦   «         v st          j
        |¦  «        rt          j        |¦  «        nd
dœz  }dd|iz  }|                     |¦  «         |r‹t          j        d|
fd|	|f¦  «        t          j        |	¦  «        d
t          j	        ¦   «         v st          j
        |¦  «        rt          j        |¦  «        nd
dœz  }dd|iz  }|                     |¦  «         t          j        |d¦  «        i z  }dd|iz  }t          t          j        |¦  «        ¦  «        ‚dx}x}x}x}x}	}
g }d}|d         }||v }|}|rd}|d         }||v }|}|�st          j        d|fd||f¦  «        t          j        |¦  «        t          j        |¦  «        dœz  }dd|iz  }|                     |¦  «         |r`t          j        d|fd||f¦  «        t          j        |¦  «        t          j        |¦  «        dœz  }dd|iz  }|                     |¦  «         t          j        |d¦  «        i z  }dd|iz  }t          t          j        |¦  «        ¦  «        ‚dx}x}x}x}x}x}x}}�ŒdS ) zJVerifies character Song Binh configs define primary and secondary weapons.rD   rI   rJ   rK   NÚprimaryÚ	secondary)Úin)z%(py3)s in %(py5)sÚsb)Úpy3Úpy5z%(py7)sÚpy7)z%(py10)s in %(py12)s)Úpy10Úpy12z%(py14)sÚpy14r   zassert %(py17)sÚpy17Úweapon_type)z%(py3)s in %(py6)s)rd   r   z%(py8)sÚpy8)z%(py11)s in %(py14)s)r   ri   z%(py16)sÚpy16zassert %(py19)sÚpy19)r   r   rW   rX   rY   r!   r+   r&   r#   r$   r%   ÚappendÚ_format_boolopr'   r(   )r,   rF   Úsb_pathr\   rc   r-   Ú@py_assert2Ú@py_assert4Ú@py_assert0Ú@py_assert9Ú@py_assert11Ú@py_format6Ú@py_format8Ú@py_format13Ú@py_format15Ú@py_format16Ú@py_format18r0   Ú@py_assert10Ú@py_assert13Ú@py_assert12Ú@py_format7Ú@py_format9Ú@py_format17Ú@py_format20s                            r5   Ú8test_character_song_binh_configs_weapon_swap_conformancezZTestScaffoldingStructureAndConfig.test_character_song_binh_configs_weapon_swap_conformanceC   s/  € å/ð 	Wñ 	WˆHÝ*¨XÑ5Ð8OÑOˆGÝ�g˜s¨WÐ5Ñ5Ô5ð "¸Ý”Y˜q‘\”\�ð"ð "ð "ñ "ô "ð "ð "ð "ð "ð "ð "øøøð "ð "ð "ð "à8Ð8�9Ð8�9 �?Ð8Ð8Ð8Ð8Ð8 {Ð8 {°bÐ'8Ð8Ð8Ð8Ð8Ñ8Õ8Ô8Ð8Ð8Ð8Ð8�9 Ð8Ñ8Ô8Õ8Ô8�9Ñ8Ô8Ð8Õ8Ô8Ñ8Ô8Ð8Ð8Õ8Ô8 Ñ8Ô8Ð8Õ8Ô8 Ñ8Ô8Ð8Ð8Ð8Ð8Ñ8Ð8Ð8Ð8Ð8Ð8Ñ8Ð8Ð8×8Ò8Ð8Ñ8Ô8Ð8Ð8Ð8Õ8Ô8Ð8Ð8Ð8Ð8 {°bÐ8Ñ8Ô8Õ8Ô8 {Ñ8Ô8Ð8Õ8Ô8Ñ8Ô8Ð8Ð8Õ8Ô8°bÑ8Ô8Ð8Õ8Ô8°bÑ8Ô8Ð8Ð8Ð8Ð8Ñ8Ð8Ð8Ð8Ð8Ð8Ñ8Ð8Ð8×8Ò8Ð8Ñ8Ô8Ð8Õ8Ô8Ð8Ð8Ñ8Ô8Ð8Ñ8Ð8Ð8Ð8Ð8Ð8Ñ8Ð8Õ8Õ8Ô8Ð8Ñ8Ô8Ñ8Ô8Ð8Ð8Ð8Ð8Ð8Ð8Ð8Ð8Ð8Ð8Ð8Ð8Ð8ØVÐV�=ÐV B y¤MÐV�= MÐ1ÐVÐVÐVÐVÐV°mÐVÀrÈ+ÄÐV°mÀÐ6VÐVÐVÐVÐVÑVÕVÔVÐVÐVÐVÐV�= MÐVÑVÔVÕVÔV�=ÑVÔVÕVÔV MÑVÔVÐVÐVÑVÐVÐVÐVÐVÐVÑVÐVÐV×VÒVÐVÑVÔVÐVÐVÐVÕVÔVÐVÐVÐVÐV°mÀÐVÑVÔVÕVÔV°mÑVÔVÕVÔVÀÑVÔVÐVÐVÑVÐVÐVÐVÐVÐVÑVÐVÐV×VÒVÐVÑVÔVÐVÕVÔVÐVÐVÑVÔVÐVÑVÐVÐVÐVÐVÐVÑVÐVÕVÕVÔVÐVÑVÔVÑVÔVÐVÐVÐVÐVÐVÐVÐVÐVÐVÐVÐVÐVÐVÐVÐVÐVÐVÑVð	Wð 	Wr^   N©r   r   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r6   rA   rG   r]   r„   © r7   r5   r   r      s”   € € € € € ØQÐQð[ð [ð [ð [ð	_ð 	_ð 	_ð 	_ð	Zð 	Zð 	Zð 	Zð@ð @ð @ð @ðWð Wð Wð Wð Wð Wr7   r   c                  ó*   — e Zd ZdZdd„Zdd„Zdd„ZdS )	Ú#TestScaffoldingManifestUvInvariantszTVerifies mathematical UV boundedness [0.0, 1.0] and kinematics across all manifests.r   r   c           	     óž  — t           D ]Ä}t          |z  |› d�z  }t          |¦  «        }| }|sœt          j        d|› d�d                     |dd…         ¦  «        z   ¦  «        dz   dd	t          j        ¦   «         v st          j        |¦  «        rt          j	        |¦  «        nd	iz  }t          t          j        |¦  «        ¦  «        ‚d}ŒÅdS )
zJVerifies that 100% of monster animation frames satisfy 0.0 <= u, v <= 1.0.r;   zMonster ú UV errors:
ú
Né   ú
>assert not %(py0)sr   Úerrors)r
   r   r   r!   r"   Újoinr#   r$   r%   r&   r'   r(   )r,   r@   Úmanifest_pathr’   r-   Ú@py_format2s         r5   Ú5test_monster_manifests_all_frames_uv_strictly_boundedzYTestScaffoldingManifestUvInvariants.test_monster_manifests_all_frames_uv_strictly_boundedP   s÷   € å-ð 	Wð 	WˆEÝ.°Ñ6¸EÐ9VÐ9VÐ9VÑVˆMÝ0°Ñ?Ô?ˆFØ�:ÐV�:ÐVÕVÔVÐ>¨%Ð>Ð>Ð>ÀÇÂÈ6ÐRTÐSTÐRTÌ:ÑAVÔAVÑVÑVÔVÐVÑVÐVÐVÕVÔVÑVÔVÐVÐVÕVÔV�vÑVÔVÐVÕVÔV�vÑVÔVÐVÐVÐVÑVÐVÕVÕVÔVÐVÑVÔVÑVÔVÐVÐVÐVÐVð	Wð 	Wr7   c           	     óž  — t           D ]Ä}t          |z  |› d�z  }t          |¦  «        }| }|sœt          j        d|› d�d                     |dd…         ¦  «        z   ¦  «        dz   dd	t          j        ¦   «         v st          j        |¦  «        rt          j	        |¦  «        nd	iz  }t          t          j        |¦  «        ¦  «        ‚d}ŒÅdS )
zLVerifies that 100% of character animation frames satisfy 0.0 <= u, v <= 1.0.r;   z
Character rŽ   r�   Nr�   r‘   r   r’   )r   r   r   r!   r"   r“   r#   r$   r%   r&   r'   r(   )r,   rF   r”   r’   r-   r•   s         r5   Ú7test_character_manifests_all_frames_uv_strictly_boundedz[TestScaffoldingManifestUvInvariants.test_character_manifests_all_frames_uv_strictly_boundedW   sù   € å/ð 	\ð 	\ˆHÝ0°8Ñ;ÀÐ>^Ð>^Ð>^Ñ^ˆMÝ0°Ñ?Ô?ˆFØ�:Ð[�:Ð[Õ[Ô[ÐC¨HÐCÐCÐCÀdÇiÂiÐPVÐWYÐXYÐWYÔPZÑF[ÔF[Ñ[Ñ[Ô[Ð[Ñ[Ð[Ð[Õ[Ô[Ñ[Ô[Ð[Ð[Õ[Ô[�vÑ[Ô[Ð[Õ[Ô[�vÑ[Ô[Ð[Ð[Ð[Ñ[Ð[Õ[Õ[Ô[Ð[Ñ[Ô[Ñ[Ô[Ð[Ð[Ð[Ð[ð	\ð 	\r7   c                óÒ  — t           D �]j}t          |z  |› d�z  }t          |dd¬¦  «        5 }t          j        |¦  «        }ddd¦  «         n# 1 swxY w Y   |j        }d} ||¦  «        }ddg}||k    }	|	sÐt          j        d	|	fd
||f¦  «        dt          j	        ¦   «         v st          j
        |¦  «        rt          j        |¦  «        ndt          j        |¦  «        t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        dœz  }
dd|
iz  }t          t          j        |¦  «        ¦  «        ‚dx}x}x}x}	}|j        }d}g } |||¦  «        }t          |¦  «        }t          t          ¦  «        }||k    }|�sÎt          j        d	|fd||f¦  «        dt          j	        ¦   «         v st          j
        t          ¦  «        rt          j        t          ¦  «        nddt          j	        ¦   «         v st          j
        |¦  «        rt          j        |¦  «        ndt          j        |¦  «        t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        dt          j	        ¦   «         v st          j
        t          ¦  «        rt          j        t          ¦  «        nddt          j	        ¦   «         v st          j
        t          ¦  «        rt          j        t          ¦  «        ndt          j        |¦  «        dœ
z  }dd|iz  }t          t          j        |¦  «        ¦  «        ‚dx}x}x}x}x}x}}�Œlt           D �]j}t"          |z  |› d�z  }t          |dd¬¦  «        5 }t          j        |¦  «        }ddd¦  «         n# 1 swxY w Y   |j        }d} ||¦  «        }ddg}||k    }	|	sÐt          j        d	|	fd
||f¦  «        dt          j	        ¦   «         v st          j
        |¦  «        rt          j        |¦  «        ndt          j        |¦  «        t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        dœz  }
dd|
iz  }t          t          j        |¦  «        ¦  «        ‚dx}x}x}x}	}|j        }d}g } |||¦  «        }t          |¦  «        }t          t          ¦  «        }||k    }|�sÎt          j        d	|fd||f¦  «        dt          j	        ¦   «         v st          j
        t          ¦  «        rt          j        t          ¦  «        nddt          j	        ¦   «         v st          j
        |¦  «        rt          j        |¦  «        ndt          j        |¦  «        t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        t          j        |¦  «        dt          j	        ¦   «         v st          j
        t          ¦  «        rt          j        t          ¦  «        nddt          j	        ¦   «         v st          j
        t          ¦  «        rt          j        t          ¦  «        ndt          j        |¦  «        dœ
z  }dd|iz  }t          t          j        |¦  «        ¦  «        ‚dx}x}x}x}x}x}}�ŒldS )zDVerifies bottom-center pivot [0.5, 0.90] and 8 canonical directions.r;   rI   rJ   rK   NÚdefaultPivotg      à?gÍÌÌÌÌÌì?rO   rQ   Údatar   rS   r   Ú
directions)z”%(py11)s
{%(py11)s = %(py0)s(%(py9)s
{%(py9)s = %(py3)s
{%(py3)s = %(py1)s.get
}(%(py5)s, %(py7)s)
})
} == %(py16)s
{%(py16)s = %(py13)s(%(py14)s)
}Úsetr   )
r   Úpy1rd   re   rf   r   r   Úpy13ri   rm   zassert %(py18)sÚpy18)r
   r   rW   rX   rY   rZ   r!   r+   r#   r$   r%   r&   r'   r(   r�   r   r   r   )r,   r@   r”   r\   r›   r-   r.   r0   r1   r2   r3   r4   rr   rs   Ú@py_assert6r}   Ú@py_assert15r   r‚   Ú@py_format19rF   s                        r5   Ú6test_scaffolding_frame_pivots_and_directions_integrityzZTestScaffoldingManifestUvInvariants.test_scaffolding_frame_pivots_and_directions_integrity^   sº  € å-ð 	Pñ 	PˆEÝ.°Ñ6¸EÐ9VÐ9VÐ9VÑVˆMÝ�m S°7Ð;Ñ;Ô;ð $¸qÝ”y ‘|”|�ð$ð $ð $ñ $ô $ð $ð $ð $ð $ð $ð $øøøð $ð $ð $ð $à”8Ð:˜NÐ:�8�8˜NÑ+Ô+Ð:°°T¨{Ð:Ð+¨{Ò:Ð:Ð:Ð:Õ:Ô:Ð:Ð:Ð:Ð:Ð+¨{Ð:Ñ:Ô:Ð:Õ:Ô:Ñ:Ô:Ð:Ð:Õ:Ô:�4Ñ:Ô:Ð:Õ:Ô:�4Ñ:Ô:Ð:Ð:Õ:Ô:�8Ñ:Ô:Õ:Ô:˜NÑ:Ô:Õ:Ô:Ð+Ñ:Ô:Õ:Ô:¨{Ñ:Ô:Ð:Ð:Ñ:Ð:Ð:Ð:Ð:Ð:Ñ:Ð:Õ:Õ:Ô:Ð:Ñ:Ô:Ñ:Ô:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ø”xÐO ÐO¨bÐO�x�x ¨bÑ1Ô1ÐO•3Ð1Ñ2Ô2ÐOµcÕ:NÑ6OÔ6OÐOÐ2Ð6OÒOÐOÐOÑOÕOÔOÐOÐOÐOÐOÐ2Ð6OÐOÑOÔOÐOÕOÔOÑOÔOÐOÐOÕOÔO•3ÑOÔOÐOÕOÔO•3ÑOÔOÐOÐOÐOÕOÔOÑOÔOÐOÐOÕOÔO�tÑOÔOÐOÕOÔO�tÑOÔOÐOÐOÕOÔO�xÑOÔOÕOÔO ÑOÔOÕOÔO¨bÑOÔOÕOÔOÐ1ÑOÔOÕOÔOÐ2ÑOÔOÐOÕOÔOÑOÔOÐOÐOÕOÔOµcÑOÔOÐOÕOÔOµcÑOÔOÐOÐOÐOÕOÔOÑOÔOÐOÐOÕOÔOÕ:NÑOÔOÐOÕOÔOÕ:NÑOÔOÐOÐOÕOÔOÐ6OÑOÔOÐOÐOÑOÐOÐOÐOÐOÐOÑOÐOÕOÕOÔOÐOÑOÔOÑOÔOÐOÐOÐOÐOÐOÐOÐOÐOÐOÐOÐOÐOÐOÐOÐOÑOå/ð 	Pñ 	PˆHÝ0°8Ñ;ÀÐ>^Ð>^Ð>^Ñ^ˆMÝ�m S°7Ð;Ñ;Ô;ð $¸qÝ”y ‘|”|�ð$ð $ð $ñ $ô $ð $ð $ð $ð $ð $ð $øøøð $ð $ð $ð $à”8Ð:˜NÐ:�8�8˜NÑ+Ô+Ð:°°T¨{Ð:Ð+¨{Ò:Ð:Ð:Ð:Õ:Ô:Ð:Ð:Ð:Ð:Ð+¨{Ð:Ñ:Ô:Ð:Õ:Ô:Ñ:Ô:Ð:Ð:Õ:Ô:�4Ñ:Ô:Ð:Õ:Ô:�4Ñ:Ô:Ð:Ð:Õ:Ô:�8Ñ:Ô:Õ:Ô:˜NÑ:Ô:Õ:Ô:Ð+Ñ:Ô:Õ:Ô:¨{Ñ:Ô:Ð:Ð:Ñ:Ð:Ð:Ð:Ð:Ð:Ñ:Ð:Õ:Õ:Ô:Ð:Ñ:Ô:Ñ:Ô:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ð:Ø”xÐO ÐO¨bÐO�x�x ¨bÑ1Ô1ÐO•3Ð1Ñ2Ô2ÐOµcÕ:NÑ6OÔ6OÐOÐ2Ð6OÒOÐOÐOÑOÕOÔOÐOÐOÐOÐOÐ2Ð6OÐOÑOÔOÐOÕOÔOÑOÔOÐOÐOÕOÔO•3ÑOÔOÐOÕOÔO•3ÑOÔOÐOÐOÐOÕOÔOÑOÔOÐOÐOÕOÔO�tÑOÔOÐOÕOÔO�tÑOÔOÐOÐOÕOÔO�xÑOÔOÕOÔO ÑOÔOÕOÔO¨bÑOÔOÕOÔOÐ1ÑOÔOÕOÔOÐ2ÑOÔOÐOÕOÔOÑOÔOÐOÐOÕOÔOµcÑOÔOÐOÕOÔOµcÑOÔOÐOÐOÐOÕOÔOÑOÔOÐOÐOÕOÔOÕ:NÑOÔOÐOÕOÔOÕ:NÑOÔOÐOÐOÕOÔOÐ6OÑOÔOÐOÐOÑOÐOÐOÐOÐOÐOÑOÐOÕOÕOÔOÐOÑOÔOÑOÔOÐOÐOÐOÐOÐOÐOÐOÐOÐOÐOÐOÐOÐOÐOÐOÑOð	Pð 	Ps#   ­AÁA	ÁA	Î OÏO	ÏO	Nr…   )r†   r‡   rˆ   r‰   r–   r˜   r¤   rŠ   r7   r5   rŒ   rŒ   M   sd   € € € € € Ø^Ð^ðWð Wð Wð Wð\ð \ð \ð \ðPð Pð Pð Pð Pð Pr7   rŒ   c                  ó   — e Zd ZdZdd„ZdS )ÚTestCrossPlatformManifestParityz8Verifies Cocos Creator vs WebApp Client manifest parity.r   r   c                ó"  — t           dz  }|                     ¦   «         st          j        d|› d�¦  «         t	          t
          dd¬¦  «        5 }t          j        |¦  «        }ddd¦  «         n# 1 swxY w Y   t	          |dd¬¦  «        5 }t          j        |¦  «        }ddd¦  «         n# 1 swxY w Y   t          | 	                    di ¦  «         
                    ¦   «         ¦  «        }t          | 	                    di ¦  «         
                    ¦   «         ¦  «        }||k    }|sãt          j        d	|fd
||f¦  «        dt          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        nddt          j        ¦   «         v st          j        |¦  «        rt          j        |¦  «        nddœz  }t          j        d||z
  › d||z
  › �¦  «        dz   d|iz  }	t%          t          j        |	¦  «        ¦  «        ‚d}dS )zRValidates clip parity between Cocos and WebApp manifest if WebApp manifest exists.z#savage_primal_skills_vfx_atlas.jsonzWebApp manifest not found at z; skipping parity check.rI   rJ   rK   NÚclipsrO   )z%(py0)s == %(py2)sÚcocos_clipsÚwebapp_clips)r   r   zAClips mismatch between Cocos and WebApp manifest. In Cocos only: z, In WebApp only: z
>assert %(py4)sr   )r	   r    ÚpytestÚskiprW   r   rX   rY   r�   rZ   Úkeysr!   r+   r#   r$   r%   r&   r"   r'   r(   )
r,   Úwebapp_manifest_pathr\   Ú
cocos_dataÚwebapp_datar©   rª   r-   Ú@py_format3r/   s
             r5   Ú4test_cocos_and_webapp_manifest_cross_platform_parityzTTestCrossPlatformManifestParity.test_cocos_and_webapp_manifest_cross_platform_parityr   s6  € å-Ð0UÑUÐØ#×*Ò*Ñ,Ô,ð 	hÝŒKÐfÐ8LÐfÐfÐfÑgÔgÐgåÕ% s°WÐ=Ñ=Ô=ð 	&ÀÝœ 1™œˆJð	&ð 	&ð 	&ñ 	&ô 	&ð 	&ð 	&ð 	&ð 	&ð 	&ð 	&øøøð 	&ð 	&ð 	&ð 	&åÐ&¨°gÐ>Ñ>Ô>ð 	'À!Ýœ) A™,œ,ˆKð	'ð 	'ð 	'ñ 	'ô 	'ð 	'ð 	'ð 	'ð 	'ð 	'ð 	'øøøð 	'ð 	'ð 	'ð 	'õ ˜*Ÿ.š.¨°"Ñ5Ô5×:Ò:Ñ<Ô<Ñ=Ô=ˆÝ˜;Ÿ?š?¨7°BÑ7Ô7×<Ò<Ñ>Ô>Ñ?Ô?ˆØ˜lÒ*ð 	
ð 	
ð 	
õ 	
ìð	
ð 	
ð 	
ð 	
ˆ{˜lð 	
ñ 	
ô 	
ð 	
õ 	
ô 
ñ	
ô 	
ð 	
ð 	
õ 	
ìð ñ 	
ô 	
ð 	
õ 	
ô 
ð ñ 	
ô 	
ð 	
ð 	
ð 	
õ 	
ô 
ñ	
ô 	
ð 	
ð 	
õ 	
ìð +ñ 	
ô 	
ð 	
õ 	
ô 
ð +ñ 	
ô 	
ð 	
ð 	
ð 	
ð 	
ñ 	
ð 	
õ 	
ìðiØ)¨LÑ8ðið iØLXÐ[fÑLfðið iñ	
ô 	
ð 	
ñ 	
ð 	
ð 	
ð 	
ñ 	
ð 	
õ 	
õ 	
ìð	
ñ 	
ô 	
ñ 	
ô 	
ð 	
ð 	
ð 	
ð 	
ð 	
s$   ÁA/Á/A3Á6A3ÂB-Â-B1Â4B1Nr…   )r†   r‡   rˆ   r‰   r²   rŠ   r7   r5   r¦   r¦   o   s.   € € € € € ØBÐBð
ð 
ð 
ð 
ð 
ð 
r7   r¦   )r‰   Ú
__future__r   Úbuiltinsr#   Ú_pytest.assertion.rewriteÚ	assertionÚrewriter!   rX   Úpathlibr   r«   Ú tests.e2e_cocos.vfx_test_helpersr   r   r   r   r	   r
   r   r   r   r   rŒ   r¦   rŠ   r7   r5   ú<module>rº      sc  ððð ð #Ð "Ð "Ð "Ð "Ð "à  € € € € € € € € € € € € €€€€Ø Ð Ð Ð Ð Ð Ø €€€ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð0Wð 0Wð 0Wð 0Wð 0Wñ 0Wô 0Wð 0WðfPð Pð Pð Pð Pñ Pô Pð PðD
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð 
ð 
r7   