a £=õ`R ã@sVddlZddlmmZddlmZddlZ ddl m Z dd„Z dd„Z dd„ZdS) éN)Ú load_yamlc CsŒttdƒ ¡ƒ}ttdƒ ¡ƒ}t |d¡}t |d¡}|D]–}||v}|sÌt d|fd||f¡dt ¡vs|t  |¡r†t  |¡nddt ¡vsžt  |¡r¨t  |¡nddœ}d d |i}t t  |¡ƒ‚d}||D]þ}||} || v}|sVt d|fd || f¡d t ¡vs t  |¡r*t  |¡nd t  | ¡d œ} dd| i} t t  | ¡ƒ‚d}} |||} |||} | | k} | sÊt d| fd| | f¡t  | ¡t  | ¡dœ}dd|i}t t  |¡ƒ‚d} } } qØq@|D]¦}||v}|stt d|fd||f¡dt ¡vs t  |¡r*t  |¡nddt ¡vsFt  |¡rPt  |¡nddœ}d d |i}t t  |¡ƒ‚d}||D]}||} || v}|st d|fd || f¡d t ¡vsÊt  |¡rÔt  |¡nd t  | ¡d œ} dd| i} t t  | ¡ƒ‚d}} |||} |||} | | k} | stt d| fd| | f¡t  | ¡t  | ¡dœ}dd|i}t t  |¡ƒ‚d} } } q€qÞdS)NzItest_files/config_files/option_settings_standard_without_namespace.configzFtest_files/config_files/option_settings_standard_with_namespace.configÚoption_settings©Úin©z%(py0)s in %(py2)sÚ namespaceÚ dict_with©Úpy0Úpy2úassert %(py4)sÚpy4©z%(py0)s in %(py3)sÚ option_name©r Úpy3úassert %(py5)sÚpy5©ú==©z%(py1)s == %(py4)s©Úpy1r úassert %(py6)sÚpy6Ú dict_without© rÚopenÚreadÚparserÚoption_settings_transformÚ @pytest_arÚ_call_reprcompareÚ @py_builtinsÚlocalsÚ_should_repr_global_nameÚ _safereprÚAssertionErrorÚ_format_explanation)Z!option_settings_without_namespaceZoption_settings_with_namespacerrrÚ @py_assert1Ú @py_format3Ú @py_format5rÚ @py_assert2Ú @py_format4Ú @py_format6Ú @py_assert0Ú @py_assert3Ú @py_format7©r2úk/Users/fuellbie/tools/aws-elastic-beanstalk-deployment-workflow/ebextensions-validator/tests/test_parser.pyÚ"test_option_settings_add_namespace s Š ‚| ”‚r4c Cs†ttdƒ ¡ƒ}ttdƒ ¡ƒ}t |d¡}|d}|D]–}||v}|sÆt d|fd||f¡dt ¡vsvt  |¡r€t  |¡nddt ¡vs˜t  |¡r¢t  |¡nddœ}d d |i}t t  |¡ƒ‚d}||D]þ}||} || v}|sPt d|fd || f¡d t ¡vst  |¡r$t  |¡nd t  | ¡d œ} dd| i} t t  | ¡ƒ‚d}} |||} |||} | | k} | sÄt d| fd| | f¡t  | ¡t  | ¡dœ}dd|i}t t  |¡ƒ‚d} } } qÒq:|D]¦}||v}|snt d|fd||f¡dt ¡vst  |¡r$t  |¡nddt ¡vs@t  |¡rJt  |¡nddœ}d d |i}t t  |¡ƒ‚d}||D]}||} || v}|sút d|fd || f¡d t ¡vsÄt  |¡rÎt  |¡nd t  | ¡d œ} dd| i} t t  | ¡ƒ‚d}} |||} |||} | | k} | snt d| fd| | f¡t  | ¡t  | ¡dœ}dd|i}t t  |¡ƒ‚d} } } qzqØdS)Nz7test_files/config_files/option_settings_standard.configz8test_files/config_files/option_settings_shorthand.configrrrrÚ dict_standardr r r rrrrrrrrrrÚdict_shorthandr)Úoption_settings_standardÚoption_settings_shorthandr5r6rr)r*r+rr,r-r.r/r0r1r2r2r3Útest_option_settings_transforms Š ‚| ”‚r9c Csxt d¡}t d¡}t |¡t |¡|D]–}||v}|s¸t d|fd||f¡dt ¡vsht |¡rrt |¡nddt ¡vsŠt |¡r”t |¡nddœ}dd |i}t t  |¡ƒ‚d}||D]þ}||}||v}|sBt d|fd ||f¡d t ¡vs t |¡rt |¡nd t |¡d œ}d d|i} t t  | ¡ƒ‚d}}|||} |||} | | k}|s¶t d|fd| | f¡t | ¡t | ¡dœ}dd|i} t t  | ¡ƒ‚d} }} qÄq,|D]¦}||v}|s`t d|fd||f¡dt ¡vs t |¡rt |¡nddt ¡vs2t |¡rs &