U ë üeO7ã @söddlmZmZmZmZmZmZmZmZm Z ddlm Z m Z m Z m Z mZmZmZddlmZmZmZmZmZmZmZddlmZmZmZmZmZmZddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%ddlm&Z&m'Z'ddl(m)Z)dd l*m+Z+dd l,m-Z-m.Z.m/Z/m0Z0dd l1m2Z2m3Z3dd l4Z4dd l5Z5dd l6Z6dd l7Z7dd l1Z1z dd l8Z8Wne9e:fk rZd Z8YnXze;WneGdd„de2ƒZ?Gdd„de2ƒZ@Gdd„de2ƒZAGdd„de2ƒZBGdd„de2ƒZCeDdkròe=dƒ‚d S)é) ÚEnumMetaÚEnumÚIntEnumÚFlagÚIntFlagÚStrEnumÚ UniqueEnumÚAutoEnumÚ AddValueEnum)Ú NamedTupleÚ TupleSizeÚ MagicValueÚAddValueÚNoAliasÚUniqueÚ MultiValue)ÚAutoNumberEnumÚMultiValueEnumÚ OrderedEnumÚuniqueÚskipÚ extend_enumÚauto)ÚStdlibEnumMetaÚ StdlibEnumÚ StdlibIntEnumÚ StdlibFlagÚ StdlibIntFlagÚ StdlibStrEnum)ÚpyverÚPY3_3ÚPY3_4ÚPY3_5ÚPY3_6ÚPY3_7ÚPY3_11)Úadd_stdlib_integrationÚremove_stdlib_integrationé)Ú OrderedDict)Ú timedelta)ÚdumpsÚloadsÚ PicklingErrorÚHIGHEST_PROTOCOL)ÚTestCaseÚmainNc@sFeZdZdd„Ze ed¡dd„ƒZe ed¡dd„ƒZe e e kd¡d d „ƒZ d d „Z d d„Z dd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Zd-d.„Zd/d0„Zd1d2„Zd3d4„Z d5d6„Z!d7d8„Z"d9d:„Z#d;d<„Z$d=d>„Z%d?d@„Z&dAdB„Z'dCdD„Z(dEdF„Z)dGdH„Z*dIdJ„Z+dKdL„Z,dMdN„Z-dOdP„Z.dQdR„Z/dSdT„Z0dUdV„Z1dWdX„Z2dYdZ„Z3d[d\„Z4d]d^„Z5d_d`„Z6dadb„Z7dcdd„Z8dedf„Z9dgdh„Z:didj„Z;dkdl„Zdodp„Z?dqdr„Z@e eAkrdsdt„ZBne e kr dudt„ZBe eAkr:dvdw„ZCdxdy„ZDdzd{„ZEd|S)}Ú TestEnumV3cCs„Gdd„dtƒ}||_Gdd„dttƒ}||_Gdd„dtƒ}||_Gdd„dttƒ}||_d d lm }Gd d „d |tƒ}||_ dS) Nc@seZdZdZdZdZdZdS)z TestEnumV3.setUp..SeasonréééN)Ú__name__Ú __module__Ú __qualname__ÚSPRINGÚSUMMERÚAUTUMNÚWINTER©r<r<ú;/opt/hc_python/lib/python3.8/site-packages/aenum/test_v3.pyÚSeason!sr>c@seZdZdZdZdeZdS)z#TestEnumV3.setUp..KonstantsgB‡ ¿@gJØMû! @r2N)r5r6r7ÚEZPIZTAUr<r<r<r=Ú Konstants(sr@c@s eZdZdZdZdZdZdZdS)z TestEnumV3.setUp..Gradesér4r3r2r(N)r5r6r7ÚAÚBÚCÚDÚFr<r<r<r=ÚGrades.s rGc@seZdZdZdZdZdZdS)z%TestEnumV3.setUp..DirectionalZeastZwestZnorthZsouthN)r5r6r7ÚEASTÚWESTÚNORTHÚSOUTHr<r<r<r=Ú Directional6srLr()Údatec@seZdZdZdZdS)z!TestEnumV3.setUp..Holiday)éÝrr)rNr3éN)r5r6r7ZNEW_YEARZ IDES_OF_MARCHr<r<r<r=ÚHoliday>srP) rr>Úfloatr@rrGÚstrrLÚdatetimerMrP)Úselfr>r@rGrLrMrPr<r<r=ÚsetUp s zTestEnumV3.setUpzStdlib enum not availablecCs¨| t|jtƒ¡| t|jjtƒ¡| t|jtƒ¡| t|jtƒ¡| t|jj tƒ¡| t|jj tƒ¡t t krFGdd„dt ƒ}| t|tƒ¡| t|j tƒ¡| t|tƒ¡| t|j tƒ¡Gdd„dtƒ}| t|tƒ¡| t|j tƒ¡| t|tƒ¡| t|j tƒ¡| t|tƒ¡| t|j tƒ¡t tkr¤Gdd„dtƒ}| t|tƒ¡| t|j tƒ¡| t|tƒ¡| t|j tƒ¡dS)Nc@seZdZdZdS)z1TestEnumV3.test_stdlib_inheritence..AFlagrN©r5r6r7Úoner<r<r<r=ÚAFlagNsrXc@seZdZdZdS)z5TestEnumV3.test_stdlib_inheritence..AnIntFlagrNrVr<r<r<r=Ú AnIntFlagUsrYc@seZdZdZdS)z4TestEnumV3.test_stdlib_inheritence..AStrEnumÚ1NrVr<r<r<r=ÚAStrEnum_sr[)Ú assertTrueÚ issubclassr>rÚ isinstancer8rGÚ assertFalserrBrr#rrWrrrr%rr)rTrXrYr[r<r<r=Útest_stdlib_inheritenceCs2  z"TestEnumV3.test_stdlib_inheritencec CsxzVtƒGdd„dtƒ}| td¡*Gdd„dtƒ}Gdd„d||d}W5QRXW5tƒXGd d „d t|d}dS) NcseZdZ‡fdd„Z‡ZS)z.BadEnumTypecs"tƒ |¡}t||ƒr| ¡|S©N)ÚsuperÚ__getattribute__r^Z deprecate)ÚclsÚnameÚobj©Ú __class__r<r=rcks  zMTestEnumV3.test_stdlib_bad_getattribute..BadEnumType.__getattribute__)r5r6r7rcÚ __classcell__r<r<rgr=Ú BadEnumTypejsrjzendless recursionc@s eZdZdS)z9TestEnumV3.test_stdlib_bad_getattribute..BaseEnumN©r5r6r7r<r<r<r=ÚBaseEnumqsrlc@seZdZdZdS)z8TestEnumV3.test_stdlib_bad_getattribute..BadEnumÚbarN©r5r6r7ZFOOr<r<r<r=ÚBadEnumssro©Ú metaclassc@seZdZdZdS)z9TestEnumV3.test_stdlib_bad_getattribute..OkayEnumrmNrnr<r<r<r=ÚOkayEnumxsrr)r'r&rÚassertRaisesRegexÚRecursionErrorr)rTrjrlrorrr<r<r=Útest_stdlib_bad_getattributefs"z'TestEnumV3.test_stdlib_bad_getattributez+__qualname__ requires python 3.5 or greatercCs6tdddd}|tƒd<t|j|jƒt|j|ƒdS)NÚTheoryzrule law suppositionZspanish_inquisition)Úqualname)rÚglobalsÚtest_pickle_dump_loadr\Úrule)rTrvr<r<r=Ú'test_pickle_enum_function_with_qualname{s z2TestEnumV3.test_pickle_enum_function_with_qualnamecCs>Gdd„dtdd}| t|jjdƒd¡| |jjd¡dS)Nc@s8eZdZdZdZdZdZdZdZdZ dZ e d d „ƒZ d S) z)TestEnumV3.test_auto_init..Planet)gIæTf|ÑDg BA)gQX4EgöWA©g ÂoÞÅEg§TXA)g¶ ¥ñ ÿàDg(ëIA)gÏc‹™’Ž˜Eg€† ‘A)g™[‘\h}Eg,A)g#'?‚TöQEg€ý_xA)göJáÇ-UEg™wAcSsd}||j|j|jS)Ng yдWÒ=)ZmassZradius)rTÚGr<r<r=Úsurface_gravityŒsz9TestEnumV3.test_auto_init..Planet.surface_gravityN) r5r6r7ZMERCURYZVENUSÚEARTHZMARSZJUPITERZSATURNZURANUSZNEPTUNEÚpropertyr~r<r<r<r=ÚPlanetƒsrz mass radius©Úinitr2gš™™™™™#@r|)rÚ assertEqualÚroundrr~Úvalue)rTrr<r<r=Útest_auto_init‚szTestEnumV3.test_auto_initcCsxGdd„dtdd}| |jjd¡| |jjd¡| |jjd¡| |jjd¡| |jjd ¡| |jjd ¡dS) Nc@seZdZdZdZdZdS)z3TestEnumV3.test_auto_init_with_value..Color)r©rr(r()r2©r(rr()r3©r(r(rN)r5r6r7ÚREDÚBLUEÚGREENr<r<r<r=ÚColor•srŽz value, rgbr‚rr2r3rˆr‰rŠ)rr„r‹r†rŒrÚrgb©rTrŽr<r<r=Útest_auto_init_with_value”sz$TestEnumV3.test_auto_init_with_valuec CsX| t¡Gdd„dttd}W5QRX| t¡Gdd„dttd}W5QRXdS)Nc@s$eZdZeeedd„ZedS)ú-TestEnumV3.test_auto_turns_off..ColorcSstd|jƒdS)NzHello! My serial is %s.)Úprintr†©rTr<r<r=Úhello¦sz3TestEnumV3.test_auto_turns_off..Color.helloN)r5r6r7ÚredÚgreenÚbluer•Úroser<r<r<r=rŽ¢s rŽ©Úsettingsc@s$eZdZeeedd„ZedS)r’cWsdSrar<)rTÚargsr<r<r=Ú__init__®sz6TestEnumV3.test_auto_turns_off..Color.__init__N)r5r6r7r–r—r˜rr™r<r<r<r=rŽªs )Ú assertRaisesÚ NameErrorrr rr<r<r=Útest_auto_turns_off s  zTestEnumV3.test_auto_turns_offcCsDGdd„dttd}| t|ƒ|j|j|jg¡| |jjd¡dS)Nc@seZdZeeefdS)z$TestEnumV3.test_magic..ColorN©r5r6r7r–r—r˜r<r<r<r=rŽ³srŽršr©rr r„Úlistr–r—r˜r†rr<r<r=Ú test_magic²szTestEnumV3.test_magicc Cs,| td¡Gdd„dtƒ}W5QRXdS)Nzobject is not callablec@s eZdZdZeZedd„ƒZdS)z4TestEnumV3.test_ignore_not_overridden..ColorZ irreleventcSstd|j ¡ƒdS)Nz I am light)r“reÚlowerr”r<r<r=Úshade½sz:TestEnumV3.test_ignore_not_overridden..Color.shadeN)r5r6r7Ú_ignore_r Ú _settings_r€r¦r<r<r<r=rŽºsrŽ©rsÚ TypeErrorrrr<r<r=Útest_ignore_not_overridden¸sz%TestEnumV3.test_ignore_not_overriddencCsFGdd„dttdd}| t|ƒ|j|j|jg¡| |jjd¡dS)Nc@seZdZeeefdS)z*TestEnumV3.test_magic_start..ColorNr¡r<r<r<r=rŽÂsrŽr(©r›Ústartr¢rr<r<r=Útest_magic_startÁszTestEnumV3.test_magic_startcCs@|j}| tt|ƒƒtddddddddd d d d d ddgƒ¡dS)NrhÚ__doc__Ú __members__r6r8r9r:r;Ú__init_subclass__r5Ú __getitem__Ú__len__Ú __contains__Ú__iter__r7)r>r„ÚsetÚdir©rTr>r<r<r=Útest_dir_on_classÇs"  ýþzTestEnumV3.test_dir_on_classc Cs4|j}| tt|jƒƒtddddddddgƒ¡dS) Nrhr¯Ú__eq__Ú__hash__r6rer†Úvalues)r>r„r¶r·r;r¸r<r<r=Útest_dir_on_itemÑs  þzTestEnumV3.test_dir_on_itemcCsrGdd„dtƒ}| tt|ƒƒtddddddd d d d d ddg ƒ¡| tt|jƒƒtdddddddddg ƒ¡dS)Nc@seZdZdZdZdd„ZdS)z5TestEnumV3.test_dir_with_added_behavior..TestÚthatZthosecSs d|jS)NzWowser! I'm %s!©rer”r<r<r=ÚwowserÜsz.Test.wowserN)r5r6r7ÚthisÚtheserÀr<r<r<r=ÚTestÙsrÃrhr¯r°r6rÁrÂr±r5r²r³r´rµr7rºr»rer†r¼rÀ)rr„r¶r·rÁ)rTrÃr<r<r=Útest_dir_with_added_behaviorØs. ýþ þz'TestEnumV3.test_dir_with_added_behaviorc CsPGdd„dtƒ}Gdd„d|ƒ}| tt|jƒƒtddddd d d d d g ƒ¡dS)Nc@seZdZdd„ZdS)zDTestEnumV3.test_dir_on_sub_with_behavior_on_super..SuperEnumcSsdS)Nzdid you see me?r<r”r<r<r=Ú invisibleíszNTestEnumV3.test_dir_on_sub_with_behavior_on_super..SuperEnum.invisibleN)r5r6r7rÅr<r<r<r=Ú SuperEnumìsrÆc@seZdZdZdS)zBTestEnumV3.test_dir_on_sub_with_behavior_on_super..SubEnumrAN)r5r6r7Úsampler<r<r<r=ÚSubEnumïsrÈrhr¯rºr»r6rer†r¼rÅ)rr„r¶r·rÇ)rTrÆrÈr<r<r=Ú&test_dir_on_sub_with_behavior_on_superês  þz1TestEnumV3.test_dir_on_sub_with_behavior_on_supercCs(Gdd„dtƒ}| t|jƒtk¡dS)Nc@seZdZdZdZdZdS)zATestEnumV3.test_members_are_always_ordered..AlwaysOrderedrr2r3N)r5r6r7ÚfirstÚsecondÚthirdr<r<r<r=Ú AlwaysOrdered÷srÍ)rr\Útyper°r))rTrÍr<r<r=Útest_members_are_always_orderedösz*TestEnumV3.test_members_are_always_orderedcsj‡fdd„}|j‰| ˆjd¡| t|¡Gdd„dtƒ‰| ˆjˆj¡‡‡fdd„}| t|¡dS)NcsˆjdkdS)Nr4)r8r<)r>r<r=Ú bad_compareþsz0TestEnumV3.test_comparisons..bad_comparerc@seZdZdZdZdZdS)z)TestEnumV3.test_comparisons..Partrr2r3N)r5r6r7r8ÚCLIPZBARRELr<r<r<r=ÚPartsrÒcsˆjˆjkdSra)r8rÑr<©rÒr>r<r=rÐ s)r>ZassertNotEqualr8ržrªr)rTrÐr<rÓr=Útest_comparisonsýs  zTestEnumV3.test_comparisonsc Csv| t¡Gdd„dtƒ}W5QRX| t¡Gdd„dtƒ}W5QRX| t¡Gdd„dtƒ}W5QRXdS)Nc@seZdZdZdZdZdZdS)z.TestEnumV3.test_duplicate_name..Color1rr2r3r4Nr¡r<r<r<r=ÚColor1srÕc@s eZdZdZdZdZdd„ZdS)z.TestEnumV3.test_duplicate_name..Color2rr2r3cSsdS)Nr–r<r”r<r<r=r–sz2TestEnumV3.test_duplicate_name..Color2.redNr¡r<r<r<r=ÚColor2srÖc@s$eZdZedd„ƒZdZdZdZdS)z.TestEnumV3.test_duplicate_name..Color3cSsdS)NZredderr<r”r<r<r=r– sz2TestEnumV3.test_duplicate_name..Color3.redrr2r3N)r5r6r7r€r–r—r˜r<r<r<r=ÚColor3s  r×)ržrªr)rTrÕrÖr×r<r<r=Útest_duplicate_names    zTestEnumV3.test_duplicate_namec Cs.| t¡Gdd„dttd}W5QRXdS)Nc@seZdZdZdZdZdZdS)z:TestEnumV3.test_duplicate_value_with_unique..Colorrr2r3N©r5r6r7r–r—r˜Úrojor<r<r<r=rŽ)srŽrš)ržÚ ValueErrorrrrr<r<r=Ú test_duplicate_value_with_unique's z+TestEnumV3.test_duplicate_value_with_uniquecCszGdd„dttd}| |j|jk¡| |jjd¡| |jjd¡| t|ƒd¡| t|ƒ|j|j |j |jg¡dS)Nc@seZdZdZdZdZdZdS)z;TestEnumV3.test_duplicate_value_with_noalias..Colorrr2r3NrÙr<r<r<r=rŽ0srŽršrr4) rrr_r–rÚr„r†Úlenr£r—r˜rr<r<r=Ú!test_duplicate_value_with_noalias/s z,TestEnumV3.test_duplicate_value_with_noaliascCs&Gdd„dttd}| t|d¡dS)Nc@seZdZdZdZdZdZdS)z3TestEnumV3.test_noalias_value_lookup..Colorrr2r3NrÙr<r<r<r=rŽ<srŽršr2)rrržrªrr<r<r=Útest_noalias_value_lookup;sz$TestEnumV3.test_noalias_value_lookupcCsJGdd„dttd}| |jjd¡| |dƒ|j¡| |jjd¡dS)Nc@seZdZdZdZdZdS)z)TestEnumV3.test_multivalue..Color©rr–©r2r—©r3r˜Nr¡r<r<r<r=rŽDsrŽršrr—râ) rrr„r–r†ÚassertIsr—r˜r¼rr<r<r=Útest_multivalueCszTestEnumV3.test_multivaluec Cs.| t¡Gdd„dttd}W5QRXdS)Nc@seZdZdZdZdZdS)z?TestEnumV3.test_multivalue_with_duplicate_values..Colorràrá©r3r˜r–Nr¡r<r<r<r=rŽNsrŽrš)ržrÛrrrr<r<r=Ú%test_multivalue_with_duplicate_valuesLs z0TestEnumV3.test_multivalue_with_duplicate_valuesc Cs2| t¡Gdd„dtttfd}W5QRXdS)Nc@seZdZdZdZdZdS)zKTestEnumV3.test_multivalue_with_duplicate_values_and_noalias..ColorràráråNr¡r<r<r<r=rŽUsrŽrš)ržrªrrrrr<r<r=Ú1test_multivalue_with_duplicate_values_and_noaliasSs z.Color)r3r—Nr¡r<r<r<r=rŽ\srŽrš)rsrªrrr rr<r<r=Útest_multivalue_and_autoZsz#TestEnumV3.test_multivalue_and_autocCsfGdd„dttdd}| |jd¡| |jd¡| |jjd¡| |jjd¡| t|d ƒ¡dS) Nc@seZdZdZdZdS)z2TestEnumV3.test_autonumber_and_init..FieldúChar, Date, Logical, etc.úField offset in recordN©r5r6r7ÚTYPEÚSTARTr<r<r<r=ÚFieldbsrîr¯©r›rƒrr2rérêÚ_order_)rrr„rìrír¯r_Úhasattr©rTrîr<r<r=Útest_autonumber_and_initas z#TestEnumV3.test_autonumber_and_initcCs6Gdd„dtdd}| |jd¡| |jjd¡dS)Nc@seZdZdZdZdS)z1TestEnumV3.test_autovalue_and_init..FieldrérêNrër<r<r<r=rîlsrîú value __doc__r‚rrê)rr„rìrír¯ròr<r<r=Útest_autovalue_and_initksz"TestEnumV3.test_autovalue_and_initcCsXGdd„dtdtdd}| |jd¡| |jd¡| |jjd¡| |jjd¡dS) Nc@seZdZdZdZdS)z3TestEnumV3.test_autonumber_and_start..FieldrérêNrër<r<r<r=rîssrîr¯r()rƒr›r­rrérê)rrr„rìrír¯ròr<r<r=Útest_autonumber_and_startrs z$TestEnumV3.test_autonumber_and_startcCsGdd„dtdd}| |jd¡| |jd¡| |jd¡| |jd¡| |jjd ¡| |jjd ¡| |jjd ¡| |jjd ¡dS) Nc@seZdZdZdZdZdZdS)zBTestEnumV3.test_autonumber_and_init_and_some_values..Fieldrérê)rAú test blahú test belchN)r5r6r7rìríÚBLAHÚBELCHr<r<r<r=rî|srîrôr‚rr2rAérérêr÷rø)rr„rìrírùrúr¯ròr<r<r=Ú(test_autonumber_and_init_and_some_values{sz3TestEnumV3.test_autonumber_and_init_and_some_valuesc CsèGdd„dtdd}| |jjd¡| |jjd¡| |jjd¡| |jjd¡| |jjd ¡| |jjd ¡| td ¡Gd d„dtdd}W5QRXGd d„dtdd}|  |j j d¡| |j j d¡|  |j j d¡dS)Nc@seZdZdZdZdS)ú?TestEnumV3.test_autonumber_with_irregular_values..Point©éé )é é N©r5r6r7rÊrËr<r<r<r=ÚPoint‹srzx yr‚rrÿrr2rrzI.*number of fields provided do not match init ...x., .y.. != .3, 11, 13..c@seZdZdZdZdS)rýrþ)r3rrNrr<r<r<r=r•sc@seZdZdZdZdZdS)z?TestEnumV3.test_autonumber_with_irregular_values..Colorr<r–Nr¡r<r<r<r=rŽ˜srŽr¯r–)rr„rÊr†ÚxÚyrËrsrªr\r–r¯r—r˜)rTrrŽr<r<r=Ú%test_autonumber_with_irregular_valuesŠsz0TestEnumV3.test_autonumber_with_irregular_valuesc Cs*| t¡Gdd„dtƒ}W5QRXdS)Nc@s.eZdZdZdZdZdZeedœdd„ƒZ dS)z6TestEnumV3.test_autonumber_and_property..Colorr<©ÚreturncSs |j ¡Sra©reÚtitler”r<r<r=Úcap_name¨sz?TestEnumV3.test_autonumber_and_property..Color.cap_nameN© r5r6r7r§r–r—r˜r€rRr r<r<r<r=rŽ£s rŽ©ržrªr rr<r<r=Útest_autonumber_and_property¡s z'TestEnumV3.test_autonumber_and_propertycCshGdd„dtƒ}| t|ƒ|j|j|jg¡| dd„|Dƒdddg¡| dd„|Dƒd d d g¡dS) Nc@seZdZeeedS)z'TestEnumV3.test_autoenum..ColorNr¡r<r<r<r=rŽ­srŽcSsg|] }|j‘qSr<©r†©Ú.0Úmr<r<r=Ú ²sz,TestEnumV3.test_autoenum..rr2r3cSsg|] }|j‘qSr<r¿rr<r<r=r³sr–r—r˜©r r„r£r–r—r˜rr<r<r=Ú test_autoenum¬szTestEnumV3.test_autoenumcCshGdd„dtƒ}| t|ƒ|j|j|jg¡| dd„|Dƒdddg¡| dd„|Dƒdddg¡dS) Nc@s eZdZdd„ZeeedS)z0TestEnumV3.test_autoenum_with_str..ColorcSs|Srar<)rer­ÚcountÚ last_valuesr<r<r=Ú_generate_next_value_·szFTestEnumV3.test_autoenum_with_str..Color._generate_next_value_N)r5r6r7rr–r—r˜r<r<r<r=rŽ¶srŽcSsg|] }|j‘qSr<rrr<r<r=r½sz5TestEnumV3.test_autoenum_with_str..r–r—r˜cSsg|] }|j‘qSr<r¿rr<r<r=r¾srrr<r<r=Útest_autoenum_with_strµsz!TestEnumV3.test_autoenum_with_strcCs$Gdd„dtƒ}| |jjd¡dS)Nc@s$eZdZeeeedd„ƒZdS)z:TestEnumV3.test_autoenum_and_default_ignore..ColorcSs |j ¡Srar r”r<r<r=r ÅszCTestEnumV3.test_autoenum_and_default_ignore..Color.cap_nameN)r5r6r7r–r—r˜r€r r<r<r<r=rŽÁs rŽZBlue©r r„r˜r rr<r<r=Ú test_autoenum_and_default_ignoreÀsz+TestEnumV3.test_autoenum_and_default_ignorec Cs*| t¡Gdd„dtƒ}W5QRXdS)Nc@s.eZdZdZeeeeedœdd„ƒZ dS)z?TestEnumV3.test_autonumber_and_overridden_ignore..ColorÚ staticmethodrcSs |j ¡Srar r”r<r<r=r ÑszHTestEnumV3.test_autonumber_and_overridden_ignore..Color.cap_nameNr r<r<r<r=rŽÌs rŽrrr<r<r=Ú%test_autonumber_and_overridden_ignoreÊs z0TestEnumV3.test_autonumber_and_overridden_ignorecCs$Gdd„dtƒ}| |jjd¡dS)Nc@s.eZdZdZeeeZee dœdd„ƒZ dS)zATestEnumV3.test_autonumber_and_multiple_assignment..Colorr€rcSs |j ¡Srar r”r<r<r=r ÛszJTestEnumV3.test_autonumber_and_multiple_assignment..Color.cap_nameN) r5r6r7r§r–r—Úcyanr˜r€rRr r<r<r<r=rŽÖs rŽZCyanrrr<r<r=Ú'test_autonumber_and_multiple_assignmentÕsz2TestEnumV3.test_autonumber_and_multiple_assignmentcCsZGdd„dttttfdd}|}| |jd¡| |j|dƒkoN|dƒkn¡dS)Nc@seZdZdZdZdZdS)zHTestEnumV3.test_multivalue_and_autonumber_inherited..MeasurementÚ20110721Ú20120911Ú20110518N©r5r6r7rWÚtwoÚthreer<r<r<r=Ú Measurementásr'r(r¬r!)Úintrrrr„rWr\)rTr'ÚMr<r<r=Ú(test_multivalue_and_autonumber_inheritedàsz3TestEnumV3.test_multivalue_and_autonumber_inheritedc CsBGdd„dttd}| t¡Gdd„d|td}W5QRXdS)Nc@s eZdZdS)zDTestEnumV3.test_combine_new_settings_with_old_settings..AutoNrkr<r<r<r=ÚAutoêsr+ršc@seZdZeedZdS)zJTestEnumV3.test_combine_new_settings_with_old_settings..AutoUniquerN)r5r6r7rùZBLUHZICKr<r<r<r=Ú AutoUniqueísr,)rrržrÛr )rTr+r,r<r<r=Ú+test_combine_new_settings_with_old_settingsés z6TestEnumV3.test_combine_new_settings_with_old_settingscCsXGdd„dttƒ}| t|dƒ¡| t|dƒ¡| t|dƒ¡| t|jtƒ¡dS)Nc@sŒeZdZdZdZeZdZeƒZ e dƒD]Z e dfe de <q&e dƒD]Z e dd fe d e <qDe d ƒD]Z e d d fe de <qfe Z eZdS)z)TestEnumV3.test_timedelta..Periodz3 different lengths of time z value periodzPeriod iéÚdayzday_%drOrÿÚweekzweek_%dé éÚmonthzmonth_%dN)r5r6r7r¯Ú_init_rr¨r§ÚvarsÚPeriodÚrangeÚiÚday_1ZOneDayZweek_1ZOneWeekr<r<r<r=r6ós   r6r§r8)r*rr_rñr\r^r9)rTr6r<r<r=Útest_timedeltaòs zTestEnumV3.test_timedeltacCs`Gdd„dtƒ}t|ddƒ| |jjd¡| |jjd¡| |j|k¡| t|ƒd¡dS)Nc@seZdZdZdZdZdS)z0TestEnumV3.test_extend_enum_plain..Colorrr2r3Nr¡r<r<r<r=rŽ srŽÚbrownr4)rrr„r;rer†r\rÝrr<r<r=Útest_extend_enum_plains  z!TestEnumV3.test_extend_enum_plaincCspGdd„dtƒ}t|ddƒ| |jjd¡| |jjd¡| |j|k¡| t|ƒd¡| |jjd¡dS)Nc@seZdZdZdZdZdS)z1TestEnumV3.test_extend_enum_shadow..Colorrr2r3Nr¡r<r<r<r=rŽsrŽr†r4r)rrr„r†rer\rÝr–rr<r<r=Útest_extend_enum_shadows z"TestEnumV3.test_extend_enum_shadowcCsNGdd„dtƒ}t|dƒ| |jjd¡| |jjd¡| |jjd¡dS)Nc@seZdZdd„ZeedS)z1TestEnumV3.test_extend_enum_generate..Fooc_s|Srar<)rer­rr¼rœÚkwdsr<r<r=r!szGTestEnumV3.test_extend_enum_generate..Foo._generate_next_value_N)r5r6r7rÚaÚbr<r<r<r=ÚFoo srAÚcr?r@)r rr„r?r†r@rB)rTrAr<r<r=Útest_extend_enum_generates  z$TestEnumV3.test_extend_enum_generatec Cs:| t¡&Gdd„dttd}t|ddƒW5QRXdS)Nc@seZdZdZdZdZdS)z@TestEnumV3.test_extend_enum_unique_with_duplicate..Colorrr2r3Nr¡r<r<r<r=rŽ-srŽršr†r)ržrÛrrrrr<r<r=Ú&test_extend_enum_unique_with_duplicate+s z1TestEnumV3.test_extend_enum_unique_with_duplicatec Cs:| t¡&Gdd„dttd}t|ddƒW5QRXdS)Nc@seZdZdZdZdZdS)zDTestEnumV3.test_extend_enum_multivalue_with_duplicate..Color)rrÚ)r2Úverde)r3ZazulNr¡r<r<r<r=rŽ5srŽršr†r2)ržrÛrrrrr<r<r=Ú*test_extend_enum_multivalue_with_duplicate3s z5TestEnumV3.test_extend_enum_multivalue_with_duplicatecCsTGdd„dttd}t|ddƒ| t|d¡| |j|jk¡| |jjd¡dS)Nc@seZdZdZdZdZdS)zATestEnumV3.test_extend_enum_noalias_with_duplicate..Colorrr2r3Nr¡r<r<r<r=rŽ<srŽršr†r3) rrrržrªr_r†r˜r\rr<r<r=Ú'test_extend_enum_noalias_with_duplicate;s  z2TestEnumV3.test_extend_enum_noalias_with_duplicatecCsdd„}| t|¡dS)NcSs$Gdd„dtƒ}Gdd„dtƒ}dS)Nc@seZdZdZdZdZdS©zDTestEnumV3.test_no_duplicates..bad_duplicates..Colorrr2r3Nr¡r<r<r<r=rŽGsrŽc@seZdZdZdZdZdZdSrH)r5r6r7r–r—r˜Zgrener<r<r<r=rŽKs)r©rŽr<r<r=Úbad_duplicatesFsz5TestEnumV3.test_no_duplicates..bad_duplicates)ržrÛ)rTrJr<r<r=Útest_no_duplicatesEs zTestEnumV3.test_no_duplicatescCs&Gdd„dtƒ}Gdd„dttƒ}dS)Nc@seZdZdZdZdZdS)z2TestEnumV3.test_no_duplicates_kinda..SillyrÚdosr3N)r5r6r7rWr%rer<r<r<r=ÚSillySsrMc@seZdZdZdZdZdZdS)z4TestEnumV3.test_no_duplicates_kinda..Sillierrr2r3r4N)r5r6r7ZsinglereZtripler†r<r<r<r=ÚSillierWsrN)rr)rTrMrNr<r<r=Útest_no_duplicates_kindaRsz#TestEnumV3.test_no_duplicates_kindacCsdGdd„dttd}| t|ƒ|j|j|jg¡| |jjd¡| |jjd¡| |jjd¡dS)Nc@seZdZeeedS)z*TestEnumV3.test_auto_number..ColorN©r5r6r7r–r˜r—r<r<r<r=rŽ^srŽršrr2r3©rr r„r£r–r˜r—r†rr<r<r=Útest_auto_number]s zTestEnumV3.test_auto_numbercCsdGdd„dttd}| t|ƒ|j|j|jg¡| |jjd¡| |jjd¡| |jjd¡dS)Nc@s eZdZdd„ZeeedS)z(TestEnumV3.test_auto_name..ColorcSs|Srar<©rer­rÚlastr<r<r=rjsz>TestEnumV3.test_auto_name..Color._generate_next_value_N)r5r6r7rr–r˜r—r<r<r<r=rŽisrŽršr–r˜r—rQrr<r<r=Útest_auto_namehs zTestEnumV3.test_auto_namecCstGdd„dtƒ}Gdd„d|td}| t|ƒ|j|j|jg¡| |jjd¡| |jjd¡| |jjd¡dS) Nc@seZdZdd„ZdS)z7TestEnumV3.test_auto_name_inherit..AutoNameEnumcSs|Srar<rSr<r<r=rwszMTestEnumV3.test_auto_name_inherit..AutoNameEnum._generate_next_value_N)r5r6r7rr<r<r<r=Ú AutoNameEnumvsrVc@seZdZeeedS)z0TestEnumV3.test_auto_name_inherit..ColorNrPr<r<r<r=rŽysrŽršr–r˜r—rQ)rTrVrŽr<r<r=Útest_auto_name_inheritus z!TestEnumV3.test_auto_name_inheritcCs$Gdd„dtƒ}| |jjd¡dS)Nc@seZdZeZdZedS)z+TestEnumV3.test_auto_garbage..Colorr–N)r5r6r7r r¨r–r˜r<r<r<r=rŽ„srŽr)rr„r˜r†rr<r<r=Útest_auto_garbageƒszTestEnumV3.test_auto_garbagecCsdGdd„dttd}| t|ƒ|j|j|jg¡| |jjd¡| |jjd¡| |jjd¡dS)Nc@seZdZdZdZedS)z5TestEnumV3.test_auto_garbage_corrected..Colorr–r2NrPr<r<r<r=rŽ‹srŽršr–r2r3rQrr<r<r=Útest_auto_garbage_correctedŠs z&TestEnumV3.test_auto_garbage_correctedcCs4Gdd„dttd}| |j|j|jgt|ƒ¡dS)Nc@seZdZeZeedS)z-TestEnumV3.test_duplicate_auto..DupesN)r5r6r7ZprimerorÊrËrÌr<r<r<r=ÚDupes–srZrš)rr r„rÊrËrÌr£)rTrZr<r<r=Útest_duplicate_auto•szTestEnumV3.test_duplicate_autoc Cs.Gdd„dtƒ}t|ƒD]\}}| ||j¡q|}| |jjd¡| |jjd¡| |jjd¡| |jjd¡| |jjd¡| |jjd¡| |jjd ¡| |jjd ¡| |jjd ¡| |j jd ¡| |j jd ¡| |j jd¡| |j jd¡| |j jd¡| |j jd¡| |j jd¡| |j jd¡| |j jd¡| |j jd¡| |j jd¡| |j jd¡| |j jd¡| |j jd¡| |j jd¡| |jjd¡| |jjd¡| |jjd¡| |jjd¡| |jjd¡| |jjd ¡| |jjd!¡| |jjd"¡| |jjd#¡Gd$d„dtƒ}t|ƒD]\}}| ||jd¡q\|}| |jjd¡| |jjd%¡| |jjd¡| |jjd&¡| |jjd ¡| |jjd'¡| |j jd ¡| |j jd(¡| |j jd¡| |j jd)¡| |j jd¡| |j jd*¡| |j jd¡| |j jd+¡| |j jd¡| |j jd,¡| |jjd¡| |jjd-¡| |jjd¡| |jjd.¡| |jjd!¡| |jjd/¡| t¡Gd0d„dtƒ}W5QRX| t¡Gd1d„dtƒ}W5QRXdS)2Nc@sDeZdZdZdd„ZdZdZdZdZdZ d Z d Z d Z d Z d ZdZdS)ú7TestEnumV3.test_order_as_function..TestSequencezvalue, sequencecSs|jSra©Úsequence©Úmemberr<r<r=Ú óú@TestEnumV3.test_order_as_function..TestSequence.©úAn$(1,6)r(©úAn$(7,2)r©úAn$(9,4)r2©ú Hn$(13,6)r3©ú Cn$(19,3)r4©úZn$(1,1)rA©úBn(2,1)rû©ÚFnrÿ©úRn$(5,1)é©úSn$(6,1)r©úQn$(7,2)é N©r5r6r7r4rðÚitem_idÚ company_idÚ warehouse_noÚcompanyÚkey_typeÚ availableÚ contract_itemÚsales_categoryÚ gl_categoryÚwarehouse_categoryÚ inv_unitsr<r<r<r=Ú TestSequencežsrˆr}rer(r~rgrrrir2r€rkr3rrmr4r‚rorArƒrqrûr„rsrÿr…rurvr†rxrr‡rzr{c@s@eZdZdd„ZdZdZdZdZdZdZ d Z d Z d Z d Z d ZdS)r\cSs |jdS)Nrrr_r<r<r=raÒrbrcrdrfrhrjrlrnrprrrtrwryN)r5r6r7rðr}r~rr€rr‚rƒr„r…r†r‡r<r<r<r=rˆÑsrdrfrhrjrlrnrprrrtrwryc@sDeZdZdZdd„ZdZdZdZdZdZ d Z d Z d Z d Z d ZdZdS)r\r^cSs|jSrar]r_r<r<r=raûrbrcrdrfrhrjrlrnrprrrtrwryNr|r<r<r<r=rˆùsc@sDeZdZdZdd„ZdZdZdZdZdZ d Z d Z d Z d Z d ZdZdS)r\r^cSs|jSrar]r_r<r<r=ra rbrcrdrhrjrfryrnrprrrlrtrwN)r5r6r7r4rðr}rr€r~r‡r‚rƒr„rr…r†r<r<r<r=rˆ s)rÚ enumerater„r^r}rer†r~rr€rr‚rƒr„r…r†r‡ržrª)rTrˆr8r`Útsr<r<r=Útest_order_as_functionœs†   z!TestEnumV3.test_order_as_functioncCsTGdd„dtƒ}| |dƒ|j¡| td|d¡| td|d¡| t|d¡dS) Nc@s$eZdZdZdZdZedd„ƒZdS)z&TestEnumV3.test_missing..Colorrr2r3cSs0|dkr|jS|dkrdS|dkr(t‚ndSdS)Nr&ú bad returnrAú error out)r˜ÚZeroDivisionError)rdÚitemr<r<r=Ú _missing_sz0TestEnumV3.test_missing..Color._missing_N)r5r6r7r–r—r˜Ú classmethodrr<r<r<r=rŽs rŽr&z7 is not a valid Colorrÿzerror in .*_missing_rŒr)rrãr˜rsrÛrªržrŽrr<r<r=Ú test_missings zTestEnumV3.test_missingcsÈGdd„dtƒ}| |jjt¡| |jjt¡| |jjt¡Gdd„dƒ‰Gdd„dƒ‰G‡‡fdd„dtƒ}| |j jˆ¡| |j jˆ¡Gd d „d ƒ‰G‡fd d „d tƒ}| |j jˆ¡d S)z2Support using Enum to refer to types deliberately.c@seZdZeZeZeZdS)z.TestEnumV3.test_enum_of_types..MyTypesN) r5r6r7r(r8rQÚfrRÚsr<r<r<r=ÚMyTypes1sr•c@s eZdZdS)z*TestEnumV3.test_enum_of_types..FooNrkr<r<r<r=rA8srAc@s eZdZdS)z*TestEnumV3.test_enum_of_types..BarNrkr<r<r<r=ÚBar:sr–cseZdZ”Z”ZdS)z/TestEnumV3.test_enum_of_types..MyTypes2N)r5r6r7r?r@r<)r–rAr<r=ÚMyTypes2<sr—c@s eZdZdS)z7TestEnumV3.test_enum_of_types..SpamEnumNotInnerNrkr<r<r<r=ÚSpamEnumNotInnerAsr˜cseZdZ”ZdS)z/TestEnumV3.test_enum_of_types..SpamEnumN)r5r6r7Úspamr<)r˜r<r=ÚSpamEnumCsršN) rr„r8r†r(r“rQr”rRr?r@r™)rTr•r—ršr<)r–rAr˜r=Útest_enum_of_types/szTestEnumV3.test_enum_of_typescCs~Gdd„dtƒ}| t|jtƒ¡| |jjd¡| |jjjd¡| t |jƒ|jj|jj g¡| t |ƒ|j|j g¡dS)z'Support locally-defined nested classes.c@s(eZdZdZdZdZGdd„deƒZdS)zKTestEnumV3.test_nested_classes_in_enum_do_not_create_members..OuterÚOuterrr2c@seZdZdZdZdZdS)zQTestEnumV3.test_nested_classes_in_enum_do_not_create_members..Outer.Innerz Outer.Innerr{rN)r5r6r7Úfoormr<r<r<r=ÚInnerNsržN)r5r6r7r?r@rržr<r<r<r=rœJsrœrr{N) rr\r^ržrÎr„r?r†rr£rmr@)rTrœr<r<r=Ú1test_nested_classes_in_enum_do_not_create_membersGsþ þz.NestedEnumÚcommonZrareN©r5r6r7ÚtwigsZshinyr<r<r<r=Ú NestedEnumasr¤ú %s.NestedEnum)r(r3©Úprotocolr4) rrhr¤r5r7Ztest_pickle_exceptionržr-r£ryr\r.©rTr¤r<r<r=Ú/test_class_nested_enum_and_pickle_protocol_four_sþ ÿz:TestEnumV3.test_class_nested_enum_and_pickle_protocol_fourcCsDGdd„dtƒ}||j_d|jj|j_t|j|jjdtfddS)Nc@seZdZdZdZdSr r¢r<r<r<r=r¤psr¤r¥r(r¦) rrhr¤r5r7ryr\r£r.r¨r<r<r=r©ns  ÿcsPG‡fdd„dtƒ‰| ˆjˆjgtˆƒ¡| ˆjjd¡| ˆjjd¡dS)Ncs,eZdZdZ”ddƒZ”ddƒZdd„ZdS) z-TestEnumV3.test_enum_injection..Colorz BLACK WHITEÚblackz#000Úwhiteú#fffcSs||_||_dSra)ÚlabelÚhex)rTr­r®r<r<r=r€sz6TestEnumV3.test_enum_injection..Color.__init__N)r5r6r7rðÚBLACKÚWHITErr<rIr<r=rŽ{s  rŽr¬rª)rr„r¯r°r£r®r­r”r<rIr=Útest_enum_injectionzs zTestEnumV3.test_enum_injectioncs¸G‡fdd„dtƒ‰Gdd„dˆtƒ}| |jtj¡| t|j|jƒd¡ˆtƒd<|tƒd<ˆddƒ}| |d¡t |j|ddt fd | |jj d ¡t |j |jdt fd dS) NcsHeZdZdZdd„Zdd„Zedd„ƒZdd „Zd d „Z‡fd d „ZdS)z?TestEnumV3.test_subclasses_with_getnewargs_ex..NamedIntÚNamedIntcWsN|}t|ƒdkrtdƒ‚|d|dd…}}tj|f|žŽ}||_||_|S)Nr2z name and value must be specifiedr(r)rÝrªr(Ú__new__Ú_intnameÚ_args)rdrœrµrerTr<r<r=r³‹s zGTestEnumV3.test_subclasses_with_getnewargs_ex..NamedInt.__new__cSs |jifSra)rµr”r<r<r=Ú__getnewargs_ex__”szQTestEnumV3.test_subclasses_with_getnewargs_ex..NamedInt.__getnewargs_ex__cSs|jSra)r´r”r<r<r=r5–szHTestEnumV3.test_subclasses_with_getnewargs_ex..NamedInt.__name__cSsd t|ƒj|jt |¡¡S)Nz {}({!r}, {}))ÚformatrÎr5r(Ú__repr__r”r<r<r=r¸™s þzHTestEnumV3.test_subclasses_with_getnewargs_ex..NamedInt.__repr__cSs&t}|j}|jtkr| |¡S||ƒSra)r(Ú__str__Ú __objclass__Úobjectr¸)rTÚbaseZbase_strr<r<r=r¹žs   zGTestEnumV3.test_subclasses_with_getnewargs_ex..NamedInt.__str__csBt|ƒt|ƒ}t|ˆƒr:t|ˆƒr:ˆd |j|j¡|ƒS|SdS)Nz ({0} + {1}))r(r^r·r5)rTÚotherÚtemp©r²r<r=Ú__add__§sþzGTestEnumV3.test_subclasses_with_getnewargs_ex..NamedInt.__add__N) r5r6r7r³r¶r€r¸r¹rÀr<r¿r<r=r²‰s   r²c@seZdZdZdZdZdS)z:TestEnumV3.test_subclasses_with_getnewargs_ex..NEIÚNEI)zthe-xr)zthe-yr2N)r5r6r7rrr<r<r<r=rÁ°srÁzNamedInt('(the-x + the-y)', 3)ÚtestrAr4r¦r2) r(rrãr³r„Úreprrrrxryr.r†r\)rTrÁZNI5r<r¿r=Ú"test_subclasses_with_getnewargs_exˆs'    z-TestEnumV3.test_subclasses_with_getnewargs_excCs:Gdd„dtd}Gdd„d|tƒ}| t|jƒd¡dS)Nc@s eZdZdS)zCTestEnumV3.test_multiple_superclasses_repr.._EnumSuperClassNrkr<r<r<r=Ú_EnumSuperClassÁsrÅrpc@seZdZdZdS)z5TestEnumV3.test_multiple_superclasses_repr..ErN)r5r6r7rBr<r<r<r=r?Ãsr?z)rrr„rÃrB)rTrÅr?r<r<r=Útest_multiple_superclasses_reprÀsz*TestEnumV3.test_multiple_superclasses_reprN)Fr5r6r7rUÚunittestÚ skipUnlessrr`rurr"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ürrrrrrr r*r-r:r<r=rCrDrFrGrKrOrRrUrWrXrYr[r‹r r’r›rŸr!r©r±rÄrÆr<r<r<r=r1sˆ#  "                            |     8r1c@s€eZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„ZdS)Ú TestOrderV3z5 Test definition order versus _order_ order. cCsGdd„dtƒ}dS)Nc@seZdZdZdZdZdZdS)z,TestOrderV3.test_same_members..Colorúred green bluerr2r3N©r5r6r7rðr–r—r˜r<r<r<r=rŽÎsrŽ©rrr<r<r=Útest_same_membersÍszTestOrderV3.test_same_memberscCsGdd„dtƒ}dS)Nc@s eZdZdZdZdZdZeZdS)z9TestOrderV3.test_same_members_with_aliases..ColorrÊrr2r3N©r5r6r7rðr–r—r˜rEr<r<r<r=rŽÕs rŽrÌrr<r<r=Útest_same_members_with_aliasesÔsz*TestOrderV3.test_same_members_with_aliasesc Cs,| td¡Gdd„dtƒ}W5QRXdS)Nú#member order does not match _order_c@seZdZdZdZdZdZdS)z8TestOrderV3.test_same_members_wrong_order..ColorrÊrr3r2N©r5r6r7rðr–r˜r—r<r<r<r=rŽÞsrŽ©rsrªrrr<r<r=Útest_same_members_wrong_orderÜsz)TestOrderV3.test_same_members_wrong_orderc Cs,| td¡Gdd„dtƒ}W5QRXdS)NrÐc@seZdZdZdZdZdZdS)z7TestOrderV3.test_order_has_extra_members..Colorúred green blue purplerr2r3NrËr<r<r<r=rŽæsrŽrÒrr<r<r=Útest_order_has_extra_membersäsz(TestOrderV3.test_order_has_extra_membersc Cs,| td¡Gdd„dtƒ}W5QRXdS)NrÐc@s eZdZdZdZdZdZeZdS)zDTestOrderV3.test_order_has_extra_members_with_aliases..ColorrÔrr2r3NrÎr<r<r<r=rŽîs rŽrÒrr<r<r=Ú)test_order_has_extra_members_with_aliasesìsz5TestOrderV3.test_order_has_extra_members_with_aliasesc Cs,| td¡Gdd„dtƒ}W5QRXdS)NrÐc@s eZdZdZdZdZdZdZdS)z6TestOrderV3.test_enum_has_extra_members..ColorrÊrr2r3r4N©r5r6r7rðr–r—r˜Úpurpler<r<r<r=rŽ÷s rŽrÒrr<r<r=Útest_enum_has_extra_membersõsz'TestOrderV3.test_enum_has_extra_membersc Cs,| td¡Gdd„dtƒ}W5QRXdS)NrÐc@s$eZdZdZdZdZdZdZeZdS)zCTestOrderV3.test_enum_has_extra_members_with_aliases..ColorrÊrr2r3r4N© r5r6r7rðr–r—r˜rØrEr<r<r<r=rŽs rŽrÒrr<r<r=Ú(test_enum_has_extra_members_with_aliasesþsz4TestOrderV3.test_enum_has_extra_members_with_aliasescCsGdd„dtƒ}dS)Nc@seZdZdZdZdZdZdS)z1TestOrderV3.test_same_members_flag..ColorrÊrr2r4NrËr<r<r<r=rŽ srŽ©rrr<r<r=Útest_same_members_flagsz"TestOrderV3.test_same_members_flagcCsGdd„dtƒ}dS)Nc@s eZdZdZdZdZdZeZdS)z>TestOrderV3.test_same_members_with_aliases_flag..ColorrÊrr2r4NrÎr<r<r<r=rŽs rŽrÜrr<r<r=Ú#test_same_members_with_aliases_flagsz/TestOrderV3.test_same_members_with_aliases_flagc Cs,| td¡Gdd„dtƒ}W5QRXdS)NrÐc@seZdZdZdZdZdZdS)z=TestOrderV3.test_same_members_wrong_order_falg..ColorrÊrr4r2NrÑr<r<r<r=rŽsrŽr©rr<r<r=Ú"test_same_members_wrong_order_falgsz.TestOrderV3.test_same_members_wrong_order_falgc Cs,| td¡Gdd„dtƒ}W5QRXdS)NrÐc@seZdZdZdZdZdZdS)z.ColorrÔrr2r4NrËr<r<r<r=rŽ!srŽr©rr<r<r=Ú!test_order_has_extra_members_flagsz-TestOrderV3.test_order_has_extra_members_flagc Cs,| td¡Gdd„dtƒ}W5QRXdS)NrÐc@s eZdZdZdZdZdZeZdS)zITestOrderV3.test_order_has_extra_members_with_aliases_flag..ColorrÔrr2r4NrÎr<r<r<r=rŽ)s rŽr©rr<r<r=Ú.test_order_has_extra_members_with_aliases_flag'sz:TestOrderV3.test_order_has_extra_members_with_aliases_flagc Cs,| td¡Gdd„dtƒ}W5QRXdS)NrÐc@s eZdZdZdZdZdZdZdS)z;TestOrderV3.test_enum_has_extra_members_flag..ColorrÊrr2r4rvNr×r<r<r<r=rŽ2s rŽr©rr<r<r=Ú test_enum_has_extra_members_flag0sz,TestOrderV3.test_enum_has_extra_members_flagc Cs,| td¡Gdd„dtƒ}W5QRXdS)NrÐc@s$eZdZdZdZdZdZdZeZdS)zHTestOrderV3.test_enum_has_extra_members_with_aliases_flag..ColorrÊrr2r4rvNrÚr<r<r<r=rŽ;s rŽr©rr<r<r=Ú-test_enum_has_extra_members_with_aliases_flag9sz9TestOrderV3.test_enum_has_extra_members_with_aliases_flagN)r5r6r7r¯rÍrÏrÓrÕrÖrÙrÛrÝrÞrßràrárârãr<r<r<r=rÉÈs     rÉc@s$eZdZdd„Zdd„Zdd„ZdS)ÚTestNamedTupleV3cCsŠGdd„dttjd}|dddƒ}| d|k¡| d|k¡| d|k¡| |jd¡| |jd¡| t|dd¡| t|d¡dS)Nc@seZdZdZdZdZdS)z.TestNamedTupleV3.test_fixed_size..Bookr(rr2N©r5r6r7r ÚauthorÚgenrer<r<r<r=ÚBookGsrè©ÚsizeÚTecklaú Steven BrustÚfantasy) r r Zfixedr\r„r ræržrª©rTrèr@r<r<r=Útest_fixed_sizeFs z TestNamedTupleV3.test_fixed_sizecCsÌGdd„dttjd}|dddƒ}| d|k¡| d|k¡| d|k¡| |jd¡| |jd¡| |dd¡|ddƒ}| d|k¡| d|k¡| |jd¡| |jd¡| t|d¡dS)Nc@seZdZdZdZdS)z0TestNamedTupleV3.test_minimum_size..Bookr(rN)r5r6r7r rær<r<r<r=rèUsrèrérërìrír2) r r Úminimumr\r„r ræržrªrîr<r<r=Útest_minimum_sizeTs  z"TestNamedTupleV3.test_minimum_sizecCsîGdd„dttjd}|dddƒ}| d|k¡| d|k¡| d|k¡| |jd¡| |jd¡| |jd¡|ddƒ}| d|k¡| d|k¡| |jd¡| |jd¡| t t |d¡|jt |ddd|jt |dd dS) Nc@seZdZdZdZdZdS)z1TestNamedTupleV3.test_variable_size..Bookr(rr2Nrår<r<r<r=règsrèrérërìrírç)r rç)ræ) r r Úvariabler\r„r rærçržÚAttributeErrorÚgetattrrªrîr<r<r=Útest_variable_sizefs   z#TestNamedTupleV3.test_variable_sizeN)r5r6r7rïrñrõr<r<r<r=räDsräc@s@eZdZdd„Zdd„Zdd„Zdd„Ze e d ¡d d „ƒZ d S) ÚTestStackoverflowAnswersV3cCsPGdd„dtƒ}|}| |jjd¡| |jj|jk¡| |jj|jk¡dS)Nc@s$eZdZdZdZdZdZdd„ZdS)zOTestStackoverflowAnswersV3.test_self_referential_directions..Directions©rr()r(r)éÿÿÿÿr()r(røcSsN||_||_t|jƒrJt|jƒ}|d|d}}||_||_||_||_dS©Nr(rø)rrrÝrhr£ÚleftÚright)rTrrÚallrúrûr<r<r=rˆs  zXTestStackoverflowAnswersV3.test_self_referential_directions..Directions.__init__N)r5r6r7rJrIrKrHrr<r<r<r=Ú Directionss rýr÷) rr„rJr†r\rúrIrKrû)rTrýrEr<r<r=Ú test_self_referential_directionss z;TestStackoverflowAnswersV3.test_self_referential_directionscCsPGdd„dtƒ}| |jj|jk¡| |jj|jk¡| |jj|jk¡dS)Nc@s eZdZdZdZdZdd„ZdS)zQTestStackoverflowAnswersV3.test_self_referential_rock_paper_scissors..RPSZrockZpaperÚscissorscSs6t|jƒr2t|jƒ}|d|d}}||_||_dSrù)rÝrhr£Úbeats)rTr†rürÊÚpreviousr<r<r=r¡s   zZTestStackoverflowAnswersV3.test_self_referential_rock_paper_scissors..RPS.__init__N)r5r6r7ÚRockÚPaperÚScissorsrr<r<r<r=ÚRPS›sr)rr\rrrr)rTrr<r<r=Ú)test_self_referential_rock_paper_scissors™szDTestStackoverflowAnswersV3.test_self_referential_rock_paper_scissorsc Cs\Gdd„dtƒ}Gdd„d|ƒ}ttj td¡ƒ}| ¡}W5QRX| t  d¡|¡dS)Nc@seZdZdd„ZdS)z@TestStackoverflowAnswersV3.test_arduino_headers..CHeaderc [sX|j}t|d|ƒ}t|dƒ0}| d¡|D]}| d|j|jf¡q.W5QRXdS)Nz _%s__headerÚwzinitial header stuff here z#define %s %r )r5rôÚopenÚwriterer†)rdr>Úcls_nameZ header_pathÚfhÚenumr<r<r=r±°s   zRTestStackoverflowAnswersV3.test_arduino_headers..CHeader.__init_subclass__N)r5r6r7r±r<r<r<r=ÚCHeader¯sr c@s"eZdZej ed¡ZdZdZ dS)z@TestStackoverflowAnswersV3.test_arduino_headers..Arduinoú arduino.hrr2N) r5r6r7ÚosÚpathÚjoinÚtempdirZ_Arduino__headerÚONEÚTWOr<r<r<r=ÚArduino¸srrzv initial header stuff here #define ONE 1 #define TWO 2 ) rrrrrrÚreadr„ÚtextwrapÚdedent)rTr rr Údatar<r<r=Útest_arduino_headers­s  ûz/TestStackoverflowAnswersV3.test_arduino_headerscCszGdd„dttdd}| |jjd¡| |jjd¡| |jjd¡| |jjd¡| |jjd¡| |j jd ¡dS) Nc@sXeZdZeeeeedZe e e dZ e eedZeeeeedS)z>TestStackoverflowAnswersV3.test_create_C_like_Enum..IdéiiN)r5r6r7ÚNONEZ HEARTBEATZFLUID_TRANSFER_REQUESTZFLUID_TRANSFER_STATUS_MSGÚFLUID_TRANSFER_ERROR_MSGÚSTART_SENDING_PICTURESZSTOP_SENDING_PICTURESZSTART_RECORDING_VIDEO_REQÚSTOP_RECORDING_VIDEO_REQZVOLUME_REQUESTÚ START_CALZCLI_COMMAND_REQUESTZCLI_COMMAND_RESPONSEZNEW_DELIVERY_REQZGET_DELIVERY_FILE_REQZ GET_FILE_REQZACK_NACKZRESPONSEÚLAST_IDr<r<r<r=ÚIdÈs&r"r(r¬r4riii) rr r„rr†rrrr r!)rTr"r<r<r=Útest_create_C_like_EnumÆs z2TestStackoverflowAnswersV3.test_create_C_like_Enumzpyparsing not installedc sˆttj td¡dƒ}| d¡W5QRXddlm‰m‰m ‰m ‰m ‰ddlm ‰m ‰m‰ d‰G‡‡‡‡‡‡‡‡‡‡ f dd„dtƒ‰Gd d „d tˆd ‰Gd d „d ˆƒ}Gdd„dˆƒ}| t|ƒ|j|j|j|j|j|j|jg¡| |jjd¡| |jjd¡| |jjd¡| |jjd¡| t|ƒ|j|j|j|jg¡| |jjd¡| |jjd¡| |jjd¡| |jjd¡dS)Nú c_plus_plus.hra] stuff before enum hello { Zero, One, Two, Three, Five=5, Six, Ten=10 }; in the middle enum blah { alpha, beta, gamma = 10 , zeta = 50 }; at the end r()ÚGroupÚOptionalÚSuppressÚWordÚ ZeroOrMore)ÚalphasÚ alphanumsÚnumsc sJeZdZedd„ƒZ‡‡fdd„Z‡‡‡‡‡‡‡‡‡‡ ‡ f dd„Z‡ZS)zETestStackoverflowAnswersV3.test_c_header_scanner..CPPEnumTypec[siSrar<)ÚmetaclsÚclsnameÚbasesr>r<r<r=Ú __prepare__szQTestStackoverflowAnswersV3.test_c_header_scanner..CPPEnumType.__prepare__cstˆ|ƒj|ŽdSra)rbr)r.rœr>)Ú CPPEnumTyperhr<r=rszNTestStackoverflowAnswersV3.test_c_header_scanner..CPPEnumType.__init__c sˆdkrBtˆ|ƒj||f|Ž}| |¡tˆ|ƒj||||f|ŽSg}z| d¡}Wntk rptdƒ‚YnX| d| ¡¡}t|ƒ} |   ¡} W5QRXt ˆdƒ\} } } }ˆdƒ}ˆˆ ˆdƒ}ˆˆ ƒ}ˆ|dƒˆ| |dƒƒƒ}ˆ|ˆ||ƒƒ}||dƒ| |d ƒ| }|  | ¡D]`\}}}|j |kr>q$d }|j D]8}|jd krbt|jƒ}| |j ¡|f¡|d 7}qHq$tˆ|ƒj||f|Ž}t| ¡ƒ}|jd d„d|D]\}}|||<q¼|D]\}}|||<qÔtˆ|ƒj||||f|ŽS)NÚ_filez_file not specifiedÚ_namez{}=,r Ú_rer†Únamesr(ÚrcSs|dddkrdnd|fS)Nr(r4rr<)Úpr<r<r=ra@rbz_TestStackoverflowAnswersV3.test_c_header_scanner..CPPEnumType.__new__..)Úkey)rbr0Úupdater³ÚpopÚKeyErrorrªr¥rrÚmapÚ scanStringr r5r†r(ÚappendreÚupperr£ÚitemsÚsort)r-r.r/Zclsdictr>Ú enum_dictÚmembersÚfileZ cpp_enum_namer Ú file_contentsÚLBRACEÚRBRACEZEQÚCOMMAÚ_enumÚ identifierÚintegerZ enumValueZenumListr rr­ÚstopÚidÚentryr@rer†) ÚCPPEnumr1r%r&r'r(r)rhr+r*r,r<r=r³sH           zMTestStackoverflowAnswersV3.test_c_header_scanner..CPPEnumType.__new__)r5r6r7r‘r0rr³rir<© rOr1r%r&r'r(r)r+r*r,rgr=r1 s r1c@s eZdZdS)zATestStackoverflowAnswersV3.test_c_header_scanner..CPPEnumNrkr<r<r<r=rOHsrOrpc@seZdZej ed¡ZdS)z?TestStackoverflowAnswersV3.test_c_header_scanner..Hellor$N)r5r6r7rrrrr2r<r<r<r=ÚHelloKsrQc@seZdZej ed¡ZdZdS)z>TestStackoverflowAnswersV3.test_c_header_scanner..Blahr$ZblahN) r5r6r7rrrrr2r3r<r<r<r=ÚBlahNsrRr3rûr{ré2)rrrrrr Ú pyparsingr%r&r'r(r)r*r+r,rrr„r£ZZEROrrZTHREEZFIVEZSIXZTENr†ZALPHAZBETAZGAMMAZZETA)rTr rQrRr<rPr=Útest_c_header_scannerðs2&;þþz0TestStackoverflowAnswersV3.test_c_header_scannerN) r5r6r7rþrrr#rÇrÈrTrUr<r<r<r=rö}s * röc@s(eZdZdZdd„Zdd„Zdd„ZdS) Ú TestIssuesV3z. Problems that were stated in issues. cCsÀGdd„dtttdd}| dd„|Dƒdddg¡| d d„|Dƒd d d g¡| |dƒ|j¡| |d ƒ|j¡| |dƒ|j¡| |dƒ|j¡| |dƒ|j¡| |dƒ|j¡dS)Nc@seZdZdZdZdZdS)z7TestIssuesV3.test_auto_multi_int_1..Measurementr!r"r#Nr$r<r<r<r=r'jsr'r()r­cSsg|] }|j‘qSr<rrr<r<r=rnsz6TestIssuesV3.test_auto_multi_int_1..rr2cSsg|] }|j‘qSr<r¿rr<r<r=rosrWr%r&r!r"r#)r(r rr„rãrWr%r&©rTr'r<r<r=Útest_auto_multi_int_1isz"TestIssuesV3.test_auto_multi_int_1cCsÄGdd„dttttfdd}| dd„|Dƒdddg¡| d d„|Dƒd d d g¡| |dƒ|j¡| |d ƒ|j¡| |dƒ|j¡| |dƒ|j¡| |dƒ|j¡| |dƒ|j¡dS)Nc@seZdZdZdZdZdS)z7TestIssuesV3.test_auto_multi_int_2..Measurementr!r"r#Nr$r<r<r<r=r'xsr'r(r¬cSsg|] }|j‘qSr<rrr<r<r=r|sz6TestIssuesV3.test_auto_multi_int_2..rr2cSsg|] }|j‘qSr<r¿rr<r<r=r}srWr%r&r!r"r#) r(rrrr„rãrWr%r&rWr<r<r=Útest_auto_multi_int_2wsz"TestIssuesV3.test_auto_multi_int_2cCsÀGdd„dttdd}| |jjd¡| |jjd¡| |jjd¡t|ddd ƒ| t|ƒ|j|j |j |j g¡| |j jd¡| |j j d¡|  |dƒ|j k¡|  |d ƒ|j k¡dS) Nc@seZdZdZdZdZdS)z6TestIssuesV3.test_extend_enum_with_init..Color)rZÚyes)Ú2Úno)Ú3ÚmaybeNr¡r<r<r<r=rŽ†srŽzfoo barrïrZrZÚopacityÚ4Únever)rrr„r–r†rrmrr£r—r˜r_rer\rr<r<r=Útest_extend_enum_with_init…s z'TestIssuesV3.test_extend_enum_with_initN)r5r6r7r¯rXrYrbr<r<r<r=rVdsrVc@sœeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Ze ed¡d d!„ƒZe ed¡d"d#„ƒZe ed¡d$d%„ƒZe ed¡d&d'„ƒZe ed¡d(d)„ƒZe ed*¡d+d,„ƒZe ed*¡d-d.„ƒZe ed/¡d0d1„ƒZe eo0ee kd/¡d2d3„ƒZ!e eoNee kd/¡d4d3„ƒZ!e e"d5¡d6d7„ƒZ#e e"d5¡d8d9„ƒZ$e e%d:¡d;d<„ƒZ&d=S)>ÚTestExtendEnumV3cCsGdd„dtƒ}| tdt|dd¡t|ddƒ| |jjd¡| |jjd¡| |j|k¡| |dƒ|j¡| |d|j¡| t |ƒd¡t|dƒ| |j jd¡| |j jd¡| |j |k¡| |dƒ|j ¡| |d|j ¡| t |ƒd¡dS) Nc@seZdZdZdZdZdS)z6TestExtendEnumV3.test_extend_enum_plain..Colorrr2r3Nr¡r<r<r<r=rŽ—srŽz(.blue. already in use as .Color.blue: 3.r˜rAr;r4Úmauve) rrsrªrr„r;rer†r\rÝrdrr<r<r=r<–s   z'TestExtendEnumV3.test_extend_enum_plaincCs„Gdd„dtƒ}t|ddƒ| |jjd¡| |jjd¡| |j|k¡| |dƒ|j¡| |d|j¡| t|ƒd¡dS)Nc@seZdZdZdZdZdS)z6TestExtendEnumV3.test_extend_enum_alias..Colorrr2r3Nr¡r<r<r<r=rŽ®srŽrÚrr–r3) rrr„rÚrer†r\r–rÝrr<r<r=Útest_extend_enum_alias­s z'TestExtendEnumV3.test_extend_enum_aliascCsGdd„dtƒ}| tdt|dd¡| |jjd¡| |jjd¡| |j|k¡| |dƒ|j¡| |d|j¡| |j jd¡| |j jd¡| |j |k¡| |dƒ|j ¡| |d |j ¡| |j jd ¡| |j jd ¡| |j |k¡| |d ƒ|j ¡| t |ƒd ¡t|d d ƒ| |j jd ¡| |j jd ¡| |j |k¡| |d ƒ|j ¡| |d |j ¡| t |ƒd ¡| td t|dd¡t|dƒ| |j jd¡| |j jd¡| |j |k¡| |dƒ|j ¡| |d|j ¡| t |ƒd¡dS)Nc@seZdZdZdZdZdS)z7TestExtendEnumV3.test_extend_enum_unique..Colorrr2r3Nr¡r<r<r<r=rŽ»srŽz0 is a duplicate of rÚrr–r—r2r˜r3r;r4z3 is a duplicate of rErdrA)rrsrÛrr„r–rer†r\r—r˜rÝr;rdrr<r<r=Útest_extend_enum_uniqueºs@  z(TestExtendEnumV3.test_extend_enum_uniquecCs”Gdd„dtƒ}t|ddƒ| |jjd¡| |jjd¡| |j|k¡| |dƒ|j¡| |d|j¡| t|ƒd¡| |jjd¡dS)Nc@seZdZdZdZdZdS)z@TestExtendEnumV3.test_extend_enum_shadow_property..Colorrr2r3Nr¡r<r<r<r=rŽåsrŽr†r4r)rrr„r†rer\rÝr–rr<r<r=Ú test_extend_enum_shadow_propertyäs z1TestExtendEnumV3.test_extend_enum_shadow_propertycCsfGdd„dtƒ}Gdd„d|tƒ}| tdt|dd¡| t|ƒd¡| t|ƒ|j|j |j g¡dS) Nc@seZdZdd„ZdS)z.hohumcSs|jS©zcyanize a colorrr”r<r<r=rôszATestExtendEnumV3.test_extend_enum_shadow_base..hohum.cyanN©r5r6r7rr<r<r<r=Úhohumósrjc@seZdZdZdZdZdS)z.Colorrr2r3Nr¡r<r<r<r=rŽ÷srŽúalready in use in superclassrr4r3) r»rrsrªrr„rÝr£r–r—r˜©rTrjrŽr<r<r=Útest_extend_enum_shadow_baseòs z-TestExtendEnumV3.test_extend_enum_shadow_basecCsªGdd„dtƒ}t|dddƒ| |jjd¡| |jjd¡| |j|k¡| |dƒ|j¡| |dƒ|j¡| |d|j¡| t|ƒd¡| t dt|d¡dS) Nc@seZdZdZdZdZdS)z;TestExtendEnumV3.test_extend_enum_multivalue..Color©rr4rÿ©r2rArv©r3rûrNr¡r<r<r<r=rŽsrŽr;r{ér4z'no values specified for MultiValue enumrd) rrr„r;rer†r\rÝrsrÛrr<r<r=Útest_extend_enum_multivalueÿsz,TestExtendEnumV3.test_extend_enum_multivaluecCsŽGdd„dtƒ}| tdt|dd¡| |jjd¡| |jjd¡| |j|k¡| |dƒ|j¡| |dƒ|j¡| |dƒ|j¡| |d|j¡| |j jd ¡| |j jd ¡| |j |k¡| |d ƒ|j ¡| |d ƒ|j ¡| |d ƒ|j ¡| |d |j ¡| |j jd ¡| |j jd¡| |j |k¡| |dƒ|j ¡| |dƒ|j ¡| |dƒ|j ¡| t |ƒd¡dS)Nc@seZdZdZdZdZdS)zATestExtendEnumV3.test_extend_enum_multivalue_alias..ColorrnrorpNr¡r<r<r<r=rŽsrŽz0 is a duplicate of rÚrÿr–rr4r—r2rArvr˜r3rûr) rrsrÛrr„r–rer†r\r—r˜rÝrr<r<r=Ú!test_extend_enum_multivalue_aliass.z2TestExtendEnumV3.test_extend_enum_multivalue_aliascCs Gdd„dttƒ}| |jtk¡t|dddƒ| t|ƒ|j|j|j |j g¡| |dƒ|j k¡| |dƒ|j k¡| |j j dk¡| |j j dk¡dS)Nc@seZdZdZdZdZdS)z;TestExtendEnumV3.test_extend_enum_multivalue_str..M)Zvalue_1ÚVALUE_1)Zvalue_2ÚVALUE_2)Zvalue_3ÚVALUE_3N)r5r6r7rtrurvr<r<r<r=r),sr)ÚVALUE_4Zvalue_4) rRrr\Ú _member_type_rr„r£rtrurvrwrer†)rTr)r<r<r=Útest_extend_enum_multivalue_str+s z0TestExtendEnumV3.test_extend_enum_multivalue_strcCs‚Gdd„dtƒ}dD]\}}t|||ƒq| t|ƒd¡| t|ƒ|j|j|j|j|j g¡| |jj d¡| |jj d¡dS)Nc@seZdZdZdZdS)z3TestExtendEnumV3.test_extend_intenum..IndexééN©r5r6r7Ú DeviceTypeÚ ErrorRegisterr<r<r<r=ÚIndex9sr©)Ú ControlWordi@`)Ú StatusWordéA`)Ú OperationModei``rArzrƒ) rrr„rÝr£r}r~rr‚r„r†©rTrrer†r<r<r=Útest_extend_intenum8s $z$TestExtendEnumV3.test_extend_intenumcCsìGdd„dtƒ}d}t|ddddƒt|dd d d ƒ| t|ƒ|d ¡| t|ƒd d…|j|jg¡| |jjd¡| |jjd¡| |jj d¡| |jj d¡| |jjd ¡| |jjd¡| |jj d ¡| |jj d ¡dS)Nc@s eZdZdd„ZdZdZdZdS)z;TestExtendEnumV3.test_extend_multi_init..HTTPStatuscSs"t ||¡}||_||_||_|Sra©r(r³Ú_value_ÚphraseÚ description©rdr†r‰rŠrfr<r<r=r³Ks  zCTestExtendEnumV3.test_extend_multi_init..HTTPStatus.__new__©édÚContinuez!Request received, please continue©éezSwitching Protocolsz.Switching to new protocol; obey Upgrade header©éfÚ Processingr6N©r5r6r7r³ÚCONTINUEÚSWITCHING_PROTOCOLSÚ PROCESSINGr<r<r<r=Ú HTTPStatusJsr˜r3ÚBAD_SPAMéú Too greasyú for a trainÚBAD_EGGSéú Too greenr6r2éþÿÿÿ) rrr„rÝr£r™rr†rer‰rŠ©rTr˜Úlengthr<r<r=Útest_extend_multi_initIs"  þz'TestExtendEnumV3.test_extend_multi_initcCs¦Gdd„dtƒ}t|dƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡t|ddƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡| t|tƒ¡dS)Nc@seZdZdZdZdZdZdS)z0TestExtendEnumV3.test_extend_flag..Colorr(rr2r4N©r5r6r7r¯r‹rrŒr<r<r<r=rŽgsrŽÚMAGENTArvÚPURPLEr) rrr\r¥r^r„r†r¦r]rr<r<r=Útest_extend_flagfs  z!TestExtendEnumV3.test_extend_flagcCsGdd„dtƒ}t|ddƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡| t|tƒ¡t|dƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡t|dƒ| |j j d¡| |j jd¡| |j |k¡| |dƒ|j ¡| |d|j ¡| t |ƒd ¡dS) Nc@seZdZdZdZdZdZdS)z:TestExtendEnumV3.test_extend_flag_backwards..Colorr(rr2r4Nr¤r<r<r<r=rŽwsrŽr¦rr¥rvrdérA) rrr\r¦r^r„r†r]r¥rdrerÝrr<r<r=Útest_extend_flag_backwardsvs"   z+TestExtendEnumV3.test_extend_flag_backwardscCsGdd„dtƒ}t|dƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡t|ddƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡| t|t ƒ¡t|dƒ| |j j d¡| |j jd¡| |j |k¡| |dƒ|j ¡| |d|j ¡| t |ƒd ¡dS) Nc@seZdZdZdZdZdZdS)z3TestExtendEnumV3.test_extend_intflag..Colorr(rr2r4Nr¤r<r<r<r=rŽsrŽr¥rvr¦rrdr¨rA) rrr\r¥r^r„r†r¦r]rrdrerÝrr<r<r=Útest_extend_intflags"   z$TestExtendEnumV3.test_extend_intflagcCsGdd„dtƒ}t|ddƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡| t|tƒ¡t|dƒ| |dƒ|j k¡| t|j |ƒ¡| |j jd¡t|dƒ| |j j d¡| |j jd¡| |j |k¡| |dƒ|j ¡| |d|j ¡| t |ƒd ¡dS) Nc@seZdZdZdZdZdZdS)z=TestExtendEnumV3.test_extend_intflag_backwards..Colorr(rr2r4Nr¤r<r<r<r=rŽ¨srŽr¦rr¥rvrdr¨rA) rrr\r¦r^r„r†r]rr¥rdrerÝrr<r<r=Útest_extend_intflag_backwards§s"   z.TestExtendEnumV3.test_extend_intflag_backwardscCsNGdd„dtƒ}t|dƒ| |jjd¡| |jjd¡| t|ƒd¡dS)Nc@seZdZeƒZeƒZeƒZdS)z3TestExtendEnumV3.test_extend_strenum..ColorN©r5r6r7rr‹rrŒr<r<r<r=rŽÁsrŽr¯rªr4©rrr„r¯rer†rÝrr<r<r=Útest_extend_strenumÀs  z$TestExtendEnumV3.test_extend_strenumzStdlib Enum not availablecCsšGdd„dtƒ}| t|jddƒd¡t|ddƒ| |jjd¡| |jjd¡| |j|k¡| |dƒ|j¡| |d|j¡| t |ƒd¡dS)Nc@seZdZdZdZdZdS)z7TestExtendEnumV3.test_extend_enum_stdlib..Colorrr2r3Nr¡r<r<r<r=rŽÌsrŽZ_values_r;r4) rr„rôr–rr;rer†r\rÝrr<r<r=Útest_extend_enum_stdlibÊs z(TestExtendEnumV3.test_extend_enum_stdlibcCsDGdd„dtƒ}| tdt|dd¡t|ddƒ| |jjd¡| |jjd¡| |j|k¡| |dƒ|j¡| |d|j¡| t |ƒd¡| t |ƒ|j |j |j |jg¡| dd „|Dƒd d d dg¡t|d ƒ| |jjd ¡| |jjd¡| |j|k¡| |dƒ|j¡| |d |j¡| t |ƒd¡dS)Nc@seZdZdZdZdZdS)z=TestExtendEnumV3.test_extend_enum_plain_stdlib..Colorrr2r3Nr¡r<r<r<r=rŽÛsrŽzalready in use asr˜rAr;r4cSsg|] }|j‘qSr<r)rrBr<r<r=részBTestExtendEnumV3.test_extend_enum_plain_stdlib..rr2r3rd)rrsrªrr„r;rer†r\rÝr£r–r—r˜rdrr<r<r=Útest_extend_enum_plain_stdlibÙs$   z.TestExtendEnumV3.test_extend_enum_plain_stdlibcCs„Gdd„dtƒ}t|ddƒ| |jjd¡| |jjd¡| |j|k¡| |dƒ|j¡| |d|j¡| t|ƒd¡dS)Nc@seZdZdZdZdZdS)z=TestExtendEnumV3.test_extend_enum_alias_stdlib..Colorrr2r3Nr¡r<r<r<r=rŽõsrŽrÚrr–r3) rrr„rÚrer†r\r–rÝrr<r<r=Útest_extend_enum_alias_stdlibós z.TestExtendEnumV3.test_extend_enum_alias_stdlibcCs”Gdd„dtƒ}t|ddƒ| |jjd¡| |jjd¡| |j|k¡| |dƒ|j¡| |d|j¡| t|ƒd¡| |jjd¡dS)Nc@seZdZdZdZdZdS)zGTestExtendEnumV3.test_extend_enum_shadow_property_stdlib..Colorrr2r3Nr¡r<r<r<r=rŽsrŽr†r4r)rrr„r†rer\rÝr–rr<r<r=Ú'test_extend_enum_shadow_property_stdlibs z8TestExtendEnumV3.test_extend_enum_shadow_property_stdlibcCsfGdd„dtƒ}Gdd„d|tƒ}| tdt|dd¡| t|ƒd¡| t|ƒ|j|j |j g¡dS) Nc@seZdZdd„ZdS)zCTestExtendEnumV3.test_extend_enum_shadow_base_stdlib..hohumcSs|jSrhrr”r<r<r=rszHTestExtendEnumV3.test_extend_enum_shadow_base_stdlib..hohum.cyanNrir<r<r<r=rjsrjc@seZdZdZdZdZdS)zCTestExtendEnumV3.test_extend_enum_shadow_base_stdlib..Colorrr2r3Nr¡r<r<r<r=rŽsrŽrkrr4r3) r»rrsrªrr„rÝr£r–r—r˜rlr<r<r=Ú#test_extend_enum_shadow_base_stdlibs z4TestExtendEnumV3.test_extend_enum_shadow_base_stdlibzStdlib IntEnum not availablecCs‚Gdd„dtƒ}dD]\}}t|||ƒq| t|ƒd¡| t|ƒ|j|j|j|j|j g¡| |jj d¡| |jj d¡dS)Nc@seZdZdZdZdS)z:TestExtendEnumV3.test_extend_intenum_stdlib..Indexrzr{Nr|r<r<r<r=r srr€rArzrƒ) rrr„rÝr£r}r~rr‚r„r†r…r<r<r=Útest_extend_intenum_stdlibs $z+TestExtendEnumV3.test_extend_intenum_stdlibcCsìGdd„dtƒ}d}t|ddddƒt|dd d d ƒ| t|ƒ|d ¡| t|ƒd d…|j|jg¡| |jjd¡| |jjd¡| |jj d¡| |jj d¡| |jjd ¡| |jjd¡| |jj d ¡| |jj d ¡dS)Nc@s eZdZdd„ZdZdZdZdS)zBTestExtendEnumV3.test_extend_multi_init_stdlib..HTTPStatuscSs"t ||¡}||_||_||_|Srar‡r‹r<r<r=r³3s  zJTestExtendEnumV3.test_extend_multi_init_stdlib..HTTPStatus.__new__rŒrr‘Nr”r<r<r<r=r˜2sr˜r3r™ršr›rœrržrŸr6r2r ) rrr„rÝr£r™rr†rer‰rŠr¡r<r<r=Útest_extend_multi_init_stdlib0s"  þz.TestExtendEnumV3.test_extend_multi_init_stdlibzStdlib Flag not availablecCs¦Gdd„dtƒ}t|dƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡t|ddƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡| t|tƒ¡dS)Nc@seZdZdZdZdZdZdS)z7TestExtendEnumV3.test_extend_flag_stdlib..Colorr(rr2r4Nr¤r<r<r<r=rŽPsrŽr¥rvr¦r) rrr\r¥r^r„r†r¦r]rr<r<r=Útest_extend_flag_stdlibNs  z(TestExtendEnumV3.test_extend_flag_stdlibcCsGdd„dtƒ}t|ddƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡| t|tƒ¡t|dƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡t|dƒ| |j j d¡| |j jd¡| |j |k¡| |dƒ|j ¡| |d|j ¡dS) Nc@seZdZdZdZdZdZdS©zATestExtendEnumV3.test_extend_flag_backwards_stdlib..Colorr(rr2r4Nr¤r<r<r<r=rŽasrŽr¦rr¥r¨rdé © rrr\r¦r^r„r†r]r¥rdrerr<r<r=Ú!test_extend_flag_backwards_stdlib_s    z2TestExtendEnumV3.test_extend_flag_backwards_stdlibcCsGdd„dtƒ}t|ddƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡| t|tƒ¡t|dƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡t|dƒ| |j j d¡| |j jd¡| |j |k¡| |dƒ|j ¡| |d|j ¡dS) Nc@seZdZdZdZdZdZdSr·r¤r<r<r<r=rŽzsrŽr¦rr¥rvrdr¨r¹rr<r<r=rºxs    zStdlib IntFlag not availablecCsGdd„dtƒ}t|dƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡t|ddƒ| |dƒ|jk¡| t|j|ƒ¡| |jjd¡| t|t ƒ¡t|dƒ| |j j d¡| |j jd¡| |j |k¡| |dƒ|j ¡| |d|j ¡dS) Nc@seZdZdZdZdZdZdS)z:TestExtendEnumV3.test_extend_intflag_stdlib..Colorr(rr2r4Nr¤r<r<r<r=rŽ“srŽr¥rvr¦rrdr¨) rrr\r¥r^r„r†r¦r]rrdrerr<r<r=Útest_extend_intflag_stdlib‘s    z+TestExtendEnumV3.test_extend_intflag_stdlibcCs<Gdd„dtƒ}ttkr&d}d}d}n d}d}d}t|dd ƒ| |d ƒ|jk¡| t|j|ƒ¡| |jjd ¡| t |t ƒ¡t|d ƒ| ||ƒ|j k¡| t|j |ƒ¡| |j j|¡t|d ƒ| |j j d ¡| |j j|¡| |j |k¡| ||ƒ|j ¡| |d |j ¡| t|ƒ|t|ƒ¡dS) Nc@seZdZdZdZdZdZdS)zDTestExtendEnumV3.test_extend_intflag_backwards_stdlib..Colorr(rr2r4Nr¤r<r<r<r=rŽ«srŽrArvr¨rÿr¸r¦rr¥rd)rrr%rr\r¦r^r„r†r]rr¥rdrerÝr£)rTrŽr¢r¥rdr<r<r=Ú$test_extend_intflag_backwards_stdlib©s0   z5TestExtendEnumV3.test_extend_intflag_backwards_stdlibzStdlib StrEnum not availablecCsNGdd„dtƒ}t|dƒ| |jjd¡| |jjd¡| t|ƒd¡dS)Nc@seZdZeƒZeƒZeƒZdS)z:TestExtendEnumV3.test_extend_strenum_stdlib..ColorNr¬r<r<r<r=rŽÎsrŽr¯rªr4r­rr<r<r=Útest_extend_strenum_stdlibÌs  z+TestExtendEnumV3.test_extend_strenum_stdlibN)'r5r6r7r<rerfrgrmrrrsryr†r£r§r©rªr«r®rÇrÈrr¯r°r±r²r³rr´rµrr¶rr%rºrr»r¼rr½r<r<r<r=rc”sR *                      " rcÚ__main__zD'test_v3.py' should not be run by itself; it's included in 'test.py')Er6rrrrrrrr r r r r rrrrrrrrrrrrIrrrrrrrr r!r"r#r$r%r&r'Ú collectionsr)rSr*Úpickler+r,r-r.rÇr/r0rÚsysÚtempfilerrTÚ ImportErrorÚ SyntaxErrorrtrŸÚ RuntimeErrorr1rÉrärörVrcr5r<r<r<r=ÚsT,$$ $     1|9h0H