
    6bh                    R   d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
Zd dlmZ d dlmZ d dlmZmZmZmZmZmZmZmZmZ d dlmZmZmZmZmZmZ d dlmZm Z m!Z!m"Z"m#Z# d dlm$Z$m%Z%m&Z& d dl'm(Z( d d	l)m*Z*m+Z+m,Z,m-Z- d d
l.m/Z/ d dl0m1Z1m2Z2 d dl0m3Z3 d dlm4Z4 ejj                  dd Z6d Z7e8Z9e9ju                  d      d   Z;	  G d de      Z<	  G d de?e      Z@	  G d deAe      ZB	  G d de      ZC G d de      ZD G d de      ZE G d de      ZF G d  d!e      ZG	  ed"d#e8$      ZH	  ed%d&      ZI	  ed'd(d)*      ZJ	  G d+ d,e      ZKdd-ZLd. ZM G d/ d0ej                        ZO G d1 d2      ZPej                   G d3 d4eej8                  5             ZRej                   G d6 d7eej4                  5             ZSej                   G d8 d9e             ZT G d: d;      ZU G d< d=      ZV G d> d?      ZW G d@ dA      ZX G dB dC      ZY G dD dEeUeVej                        ZZ G dF dGeUeVej                        Z[ G dH dIeUeVeYej                        Z\ G dJ dKeUeVeYej                        Z] G dL dMeUeXej                        Z^ G dN dOeUeXej                        Z_ G dP dQeUeXej                        Z` G dR dSeUeXej                        Za G dT dUeUeXeYej                        Zb G dV dWeUeXeYej                        Zc G dX dYeUeWej                        Zd G dZ d[eUeWej                        Ze G d\ d]eUeWej                        Zf G d^ d_eUeWej                        Zg G d` daeUeWeYej                        Zh G db dceUeWeYej                        Zi G dd deeUeWej                        Zj G df dgeUeWej                        Zk G dh dieUeXej                        Zl G dj dkeUeXej                        Zm G dl dmeUeWej                        Zn G dn doeUeWej                        Zo G dp dqeUeXej                        Zp G dr dseUeXej                        Zq G dt duej                        Zr G dv dwej                        Zs G dx dyej                        Zt G dz d{ej                        Zu G d| d}ej                        Zv G d~ dej                        Zw G d dej                        Zx G d dej                        Zy G d dej                        ZzdZ{dZ| G d dej                        Z} G d dej                        Z~dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ G d dej                        Zd Zd Ze8dk(  r ej,                          yy# e=$ rZ>e>Z<Y dZ>[>dZ>[>ww xY w# e=$ rZ>e>Z@Y dZ>[>dZ>[>ww xY w# e=$ rZ>e>ZBY dZ>[>dZ>[>ww xY w# e=$ rZ>e>ZCY dZ>[>dZ>[>ww xY w# e=$ rZ>e>ZHY dZ>[>dZ>[>ww xY w# e=$ rZ>e>ZIY dZ>[>dZ>[>ww xY w# e=$ rZ>e>ZJY dZ>[>dZ>[>ww xY w# e=$ r Y w xY w)    N)OrderedDictdate)	EnumEnumMetaIntEnumStrEnumEnumTypeFlagIntFlaguniqueauto)STRICTCONFORMEJECTKEEP_simple_enum_test_simple_enum)verifyUNIQUE
CONTINUOUSNAMED_FLAGSReprEnum)member	nonmember_iter_bits_lsb)StringIO)dumpsloadsPicklingErrorHIGHEST_PROTOCOL)support)	ALWAYS_EQ	REPO_ROOT)threading_helper)	timedelta   c                 z   |j                  t        j                  t                     t        j
                  j                  t        d      }t        j
                  j                  |      rF|j                  t        j                  |dt        j                  t        j                  z               t        j
                  j                  t        d      }t        j
                  j                  |      rF|j                  t        j                  |dt        j                  t        j                  z               |S )NzDoc/library/enum.rstF)module_relativeoptionflagszDoc/howto/enum.rst)addTestsdoctestDocTestSuiteenumospathjoinr$   existsDocFileSuiteELLIPSISNORMALIZE_WHITESPACE)loadertestsignore	lib_testshowto_testss        8/opt/python-3.12.12/usr/lib/python3.12/test/test_enum.py
load_testsr<      s    	NN7''-.Y(>?I	ww~~i w++ %#,,W-I-II 	
 '',,y*>?K	ww~~k"w++ %#,,W-I-II 	
 L    .c                       e Zd ZdZdZdZy)Stooges   r'      N__name__
__module____qualname__LARRYCURLYMOE r=   r;   rA   rA   3       r=   rA   c                       e Zd ZdZdZdZy)
IntStoogesrB   r'   rC   NrD   rK   r=   r;   rN   rN   ;   rL   r=   rN   c                       e Zd ZdZdZdZy)FloatStoogesg=
ףp=?g(\@gR$_	$	@NrD   rK   r=   r;   rP   rP   C   s    r=   rP   c                       e Zd ZdZdZdZdZy)FlagStoogesrB   r'        NrE   rF   rG   rH   rI   rJ   BIGrK   r=   r;   rR   rR   K   s    r=   rR   c                        e Zd ZdZdZdZdZdZy)FlagStoogesWithZeror   rB   r'   rS   rT   NrE   rF   rG   NOFLAGrH   rI   rJ   rV   rK   r=   r;   rX   rX   S       FEE
C
Cr=   rX   c                       e Zd ZdZdZdZdZy)IntFlagStoogesrB   r'   rS   rT   NrU   rK   r=   r;   r]   r]   Z   s    EE
C
Cr=   r]   c                        e Zd ZdZdZdZdZdZy)IntFlagStoogesWithZeror   rB   r'   rS   rT   NrY   rK   r=   r;   r_   r_   `   r[   r=   r_   c                       e Zd ZdZdZy)NameGuido van RossumzBarry WarsawN)rE   rF   rG   BDFLFLUFLrK   r=   r;   ra   ra   h   s    DEr=   ra   Questionzwho what when where whymoduleAnswerzhim this then there becauseTheoryzrule law suppositionspanish_inquisition)qualnamec                       e Zd ZdZdZdZy)FruitrB   r'   rC   N)rE   rF   rG   TOMATOBANANACHERRYrK   r=   r;   rm   rm   }   s    r=   rm   c           	      t    ||}t        t        dz         D ]  } | t        t        ||            |       ! y NrB   )protocol)ranger!   r   r   )	assertionsourcetargetrs   s       r;   test_pickle_dump_loadrx      s7    ~*Q./%fx896B 0r=   c                     t        t        dz         D ]   } | |      5  t        ||       d d d        " y # 1 sw Y   -xY wrr   )rt   r!   r   )ru   	exceptionobjrs   s       r;   test_pickle_exceptionr|      s8    *Q./y!#) "! 0!!s	   7A 	c                   >    e Zd ZdZdZdZdZdZd Zd Z	d Z
d	 Zd
 Zy)TestHelpers_bad__good_	_what_ho___mal____bien____que_que___MyEnum__private_MyEnum__still_private_MyEnum__private__MyEnum__also_private_okay_semi_private_weird__	_MyEnum__c                      G d d      }dD ]^  } |       }| j                  t        j                  |             t        ||d       | j	                  t        j                  |             ` y )Nc                       e Zd Zy)+TestHelpers.test_is_descriptor.<locals>.fooNrE   rF   rG   rK   r=   r;   foor          r=   r   )__get____set__
__delete__rB   )assertFalser.   _is_descriptorsetattr
assertTrue)selfr   attrr{   s       r;   test_is_descriptorzTestHelpers.test_is_descriptor   sY    	 	6D%CT0056Cq!OOD//45	 7r=   c                    | j                   | j                  z   D ]*  }| j                  t        j                  |      d|z         , | j
                  | j                  z   | j                  z   D ]*  }| j                  t        j                  |      d|z         , dD ]&  }| j                  t        j                  |             ( dD ]&  }| j                  t        j                  |             ( y )N%r is a not sunder name?%r is a sunder name?)_a__aa_)aa__a__aa____a___a____a________________	sunder_namesprivate_and_sunder_namesr   r.   
_is_sunderdunder_namesprivate_namesrandom_namesr   r   namess      r;   test_sunderzTestHelpers.test_sunder   s    %%(E(EEDOODOOD13MPT3TU F%%(:(::T=N=NNDT__T24JT4QR O AOODOOA./ !/AT__Q/0/r=   c                    | j                   D ]*  }| j                  t        j                  |      d|z         , | j                  | j
                  z   | j                  z   | j                  z   D ]*  }| j                  t        j                  |      d|z         , dD ]&  }| j                  t        j                  |             ( dD ]&  }| j                  t        j                  |             ( y )N%r is a not dunder name?%r is a dunder name?)r   __aa__)r   r   r   r   r   r   r   r   r   r   r   r   r   	r   r   r.   
_is_dunderr   r   r   r   r   r   s      r;   test_dunderzTestHelpers.test_dunder   s    %%DOODOOD13MPT3TU &%%(:(::T=Z=ZZ]a]n]nnDT__T24JT4QR o$AOODOOA./ %/AT__Q/0/r=   c                 .   | j                   | j                  z   D ](  }| j                  t        j                  d|      d       * | j
                  | j                  z   | j                  z   D ](  }| j                  t        j                  d|      d       * y NMyEnumz%r is a not private name?z%r is a private name?	r   r   r   r.   _is_privater   r   r   r   r   r   s     r;   test_is_privatezTestHelpers.test_is_private       &&)F)FFDOOD,,Xt<>YZ G%%(9(99D<M<MMDT--h=?VW Nr=   c                     | j                  t        t        d            g d       | j                  t        dt        t        d             y )N   rB   r'   rS   z-8 is not a positive integer)assertEquallistr   assertRaisesRegex
ValueErrorr   s    r;   test_iter_bits_lsbzTestHelpers.test_iter_bits_lsb   s8    nQ/0)<z+I4Q_`bQcdr=   N)rE   rF   rG   r   r   r   r   r   r   r   r   r   r   rK   r=   r;   r~   r~      s9     2L7L@MLCL6	1	1Xer=   r~   c                       e Zd ZddZd Zy)classpropertyNc                 \    || _         || _        || _        |||j                  }|| _        y N)fgetfsetfdel__doc__)r   r   r   r   docs        r;   __init__zclassproperty.__init__   s1    			;4+,,Cr=   c                 $    | j                  |      S r   )r   )r   instance
ownerclasss      r;   r   zclassproperty.__get__   s    yy$$r=   )NNNN)rE   rF   rG   r   r   rK   r=   r;   r   r      s    %r=   r   c                   :    e Zd ZdZ e       Z e       Z e       Zy)HeadlightsKr   N)rE   rF   rG   OFF_Kr   
LOW_BEAM_KHIGH_BEAM_KFOG_KrK   r=   r;   r   r          EJ&KFEr=   r   boundaryc                   :    e Zd ZdZ e       Z e       Z e       Zy)HeadlightsCr   N)rE   rF   rG   OFF_Cr   
LOW_BEAM_CHIGH_BEAM_CFOG_CrK   r=   r;   r   r      r   r=   r   c                       e Zd ZdZdZy)NoNamerB   r'   NrE   rF   rG   ONETWOrK   r=   r;   r   r      s    
C
Cr=   r   c                       e Zd ZdZdZd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d  Z"d! Z#d" Z$d# Z%y)$
_EnumTestszX
    Test for behavior that is the same across the different types of enumerations.
    Nc           	           j                   j                  dd  dk(  r G d d j                        } G  fdd|      }| _         G d d j                        }| _         G d	 d
 j                        }| _         G d d j                        }| _         G d d j                        }| _         G d d|      }| _         G d d j                        }| _	         G d d j                        }	|	 _
        d _        g d _        t        |t              r j                   _        nk|j                   t"        u r
g d _        nOt         j                  t$              rg d _        d _         |d       _        n j                  xs g d _        t)         dd      s j                   _        y y  j                   j                  dd  dk(  rHt,        j.                  d        }
 j                  dd |
i      }t1               }
t1               }t1               }t         j                  t$              rd!}n|} |dt3        |
|||"            x _        }d# }t1               }
 j                  dd |
fd$|ff       _        d% }t1               }
 j                  d
d |
fd&|fg       _        d' }d( }t1               }
 j                  dt3        |
||)             _        d* }d+ } j                  dt3        ||,             _         j                  dd        _        d- } j                  dd.|i       _	        t4        d/        } j                  dd.|i       _
        d _        g d _        t        |t              r j                   _        nk|j                   t"        u r
g d _        nOt         j                  t$              rg d _        d _         |d       _        n j                  xs g d _        t)         dd      s j                   _        y y t7        d0 j                   j                  z        )1NClassc                   0    e Zd Zej                  d        Zy)"_EnumTests.setUp.<locals>.BaseEnumc                      d| j                   z  S Nz%s is first!r   r   s    r;   firstz(_EnumTests.setUp.<locals>.BaseEnum.first   s    )DII55r=   N)rE   rF   rG   r.   propertyr  rK   r=   r;   BaseEnumr      s    6 6r=   r  c                   j    e Zd Z e       Z e       Z e       Z eW  j                  e	      rdZ
yeZ
y)"_EnumTests.setUp.<locals>.MainEnumrC   N)rE   rF   rG   r   r  secondthird
issubclass	enum_typer   duper   s   r;   MainEnumr     s0    dnnd3D Dr=   r  c                        e Zd Zd Z e       Zy)$_EnumTests.setUp.<locals>.NewStrEnumc                 6    | j                   j                         S r   r   upperr   s    r;   __str__z,_EnumTests.setUp.<locals>.NewStrEnum.__str__      99??,,r=   N)rE   rF   rG   r  r   r  rK   r=   r;   
NewStrEnumr        -r=   r  c                        e Zd Zd Z e       Zy)'_EnumTests.setUp.<locals>.NewFormatEnumc                 6    | j                   j                         S r   r  r   specs     r;   
__format__z2_EnumTests.setUp.<locals>.NewFormatEnum.__format__
  r  r=   N)rE   rF   rG   r  r   r  rK   r=   r;   NewFormatEnumr  	  r  r=   r  c                   &    e Zd Zd Zd Z e       Zy)*_EnumTests.setUp.<locals>.NewStrFormatEnumc                 6    | j                   j                         S r   r   titler   s    r;   r  z2_EnumTests.setUp.<locals>.NewStrFormatEnum.__str__  r  r=   c                 J    dj                  t        | j                              S N r1   reversedr   r  s     r;   r  z5_EnumTests.setUp.<locals>.NewStrFormatEnum.__format__      778DII#677r=   N)rE   rF   rG   r  r  r   r  rK   r=   r;   NewStrFormatEnumr    s    -8r=   r)  c                       e Zd Zd Zd Zy)%_EnumTests.setUp.<locals>.NewBaseEnumc                 6    | j                   j                         S r   r!  r   s    r;   r  z-_EnumTests.setUp.<locals>.NewBaseEnum.__str__  r  r=   c                 J    dj                  t        | j                              S r$  r&  r  s     r;   r  z0_EnumTests.setUp.<locals>.NewBaseEnum.__format__  r(  r=   N)rE   rF   rG   r  r  rK   r=   r;   NewBaseEnumr+    s    -8r=   r.  c                       e Zd Z e       Zy)$_EnumTests.setUp.<locals>.NewSubEnumN)rE   rF   rG   r   r  rK   r=   r;   
NewSubEnumr0    s	    r=   r1  c                       e Zd Zd Zy)!_EnumTests.setUp.<locals>.LazyGNVc                      y r   rK   r   startlastvaluess       r;   _generate_next_value_z7_EnumTests.setUp.<locals>.LazyGNV._generate_next_value_"  s    r=   NrE   rF   rG   r9  rK   r=   r;   LazyGNVr3  !  s    r=   r;  c                       e Zd Zed        Zy)!_EnumTests.setUp.<locals>.BusyGNVc                      y r   rK   r5  s       r;   r9  z7_EnumTests.setUp.<locals>.BusyGNV._generate_next_value_'  s    r=   NrE   rF   rG   staticmethodr9  rK   r=   r;   BusyGNVr=  &  s     r=   rA  F)r  r  r	  )123r   T   rB   r'   rC   source_valuesr   Functionc                      d| j                   z  S r  r  r   s    r;   r  z_EnumTests.setUp.<locals>.first<  s    %		11r=   r  rC   )r  r  r	  r  c                 6    | j                   j                         S r   r  r   s    r;   r  z!_EnumTests.setUp.<locals>.__str__J      yy((r=   r  c                 6    | j                   j                         S r   r  r  s     r;   r  z$_EnumTests.setUp.<locals>.__format__O  rK  r=   r  c                 6    | j                   j                         S r   r!  r   s    r;   r  z!_EnumTests.setUp.<locals>.__str__T  rK  r=   c                 J    dj                  t        | j                              S r$  r&  r  s     r;   r  z$_EnumTests.setUp.<locals>.__format__V      wwx		233r=   )r  r  r  c                 6    | j                   j                         S r   r!  r   s    r;   r  z!_EnumTests.setUp.<locals>.__str__[  rK  r=   c                 J    dj                  t        | j                              S r$  r&  r  s     r;   r  z$_EnumTests.setUp.<locals>.__format__]  rO  r=   )r  r  c                      y r   rK   r5  s       r;   r9  z/_EnumTests.setUp.<locals>._generate_next_value_b      r=   r9  c                      y r   rK   r5  s       r;   r9  z/_EnumTests.setUp.<locals>._generate_next_value_f  s    r=   zunknown enum style: %r)	__class__rE   r  r  r  r  r)  r.  r1  r;  rA  is_flagnamesr
  r	   r8  _member_type_strr   dupe2getattrrG  r.   r  r   dictr@  r   )r   r  r  r  r  r)  r.  r1  r;  rA  r  r  r	  r  r  r  r9  s   `                r;   setUpz_EnumTests.setUp   s   >>""23'7264>> 6!8 ! %DMT^^  )DO  "/D4>>  %5D!8dnn 8
  +D[ (DO$..  #DL$..  #DL DL5DJ(G,"jj''3.-DNND1'#%a[
"kk6Y4%8%)[[" 9^^$$RS)Z7]]2 2~~j75/BHFEVFFE$..$/'/
DuU[chos<t'uuDMH)FE"nn\WUOYW^L_;`aDO)FE!%75/S_`jRkAl!mD)4FE$(NN3EtRWdnx  HA  %BD!)4#~~mTZah=ijD"..|WEDO>>)6MNc5deDL >>)6MNc5deDL DL5DJ(G,"jj''3.-DNND1'#%a[
"kk6Y4%8%)[[" 9 58O8OOPPr=   c                 x    | j                  |j                  |      |j                  |j                               y r   )r   formatvaluer   r  r   s      r;   assertFormatIsValuez_EnumTests.assertFormatIsValue}  s(    V,dkk&,,.GHr=   c                 v    | j                  |j                  |      |j                  t        |                   y r   )r   r_  rY  ra  s      r;   assertFormatIsStrz_EnumTests.assertFormatIsStr  s(    V,dkk#f+.FGr=   c                     G d d| j                         }| j                  t        |d             |`| j	                  t        |d             | j                  t              5  |`d d d        | j                  t              5  |`d d d        | j                  t              5  |j                  `	d d d        y # 1 sw Y   TxY w# 1 sw Y   @xY w# 1 sw Y   y xY w)Nc                   <    e Zd Z e       Z e       Z e       Zd Zy)2_EnumTests.test_attribute_deletion.<locals>.Seasonc                      y r   rK   )clss    r;   spamz7_EnumTests.test_attribute_deletion.<locals>.Season.spam  rS  r=   N)rE   rF   rG   r   SPRINGSUMMERAUTUMNrj  rK   r=   r;   Seasonrg    s    VFVFVFr=   rn  rj  )
r  r   hasattrrj  r   assertRaisesAttributeErrorrk  DRYr   r   rn  s     r;   test_attribute_deletionz"_EnumTests.test_attribute_deletion  s    	T^^ 	 	/0K01~. /~.
 /~." /.	 /.....s$   #B9C#C9CCCc                     | j                  t        d      5   G d d| j                        }d d d        y # 1 sw Y   y xY w)Nzhas no members definedc                   "     e Zd Z fdZdZ xZS )/_EnumTests.test_bad_new_super.<locals>.BadSuperc                 (    t         |   | |      }|S r   super__new__)ri  r`  r{   rU  s      r;   r{  z7_EnumTests.test_bad_new_super.<locals>.BadSuper.__new__  s    '/#u5CJr=   rB   )rE   rF   rG   r{  failed__classcell__rU  s   @r;   BadSuperrw    s     r=   r  )r   	TypeErrorr  )r   r  s     r;   test_bad_new_superz_EnumTests.test_bad_new_super  s6    ##(4>> 	  s   6?c                    | j                   }| j                  r| j                  t        |      d       | j                  t	        |      d       | j                  t        |      d       | j                   |d      | j                  u        | j                  d|v        nQ| j                  t        |      d       | j                  t	        |      d       | j                  t        |      d       | j                  t        |      |j                  |j                  |j                  g       | j                  |D cg c]  }|j                   c}| j                         | j                  |D cg c]  }|j                   c}| j                         | j                  |D cg c]  }|j                   c}g d       t!        || j                  d      D ]  \  }}| j#                  ||   |        t!        || j                  d      D ]  \  }}| j#                   ||      |        t%        |t&              r6| j                  |j(                   |d      cxu xr |d	   u        y c        y |j*                  t        u r6| j                  |j(                   |d
      cxu xr |d	   u        y c        y t%        |t,              r6| j                  |j(                   |d      cxu xr |d	   u        y c        y | j                  |j(                   || j                  d         cxu xr |d	   u nc        y c c}w c c}w c c}w )Nz<flag 'MainEnum'>rE  r   z<enum 'MainEnum'>)zfirst is first!zsecond is first!zthird is first!Tstrictr	  r  rD  rC   r'   )r  rV  r   reprrY  r_  r   rZ  r   r  r  r	  r   rW  r`  r8  zipassertIsr
  r	   r  rX  r   )r   TEmr   r   r`  s         r;   test_basicsz_EnumTests.test_basics  s   ]]<<T"X':;SW&9:VBZ)<=OOBqETZZ/0OOAG$T"X':;SW&9:VBZ)<=bBHHbii#BC!#$A$

	 	"$%"Q"%	 	"$%"Q"%J	  DJJt<LFDMM"T(F+ = T[[>MFEMM"U)V, ?b'"OOBGGr'{@bj@A@A$OOBGGr#w<"V*<=<=D!OOBGGr!u:6
:;:;OOBGGr$++a.'9GRZGH- % & &s   =M1M%Mc                      G d d| j                         }| j                  |       | j                  | j                         | j                  D ]  }| j                  |        y )Nc                       e Zd Zy)+_EnumTests.test_bool_is_true.<locals>.EmptyNr   rK   r=   r;   Emptyr    r   r=   r  )r  r   r  )r   r  r   s      r;   test_bool_is_truez_EnumTests.test_bool_is_true  sH    	DNN 	&mmFOOF# $r=   c                     | j                   }| j                  t              5  d| j                   _        d d d        y # 1 sw Y   y xY w)Nzreally first)r  rp  rq  r  )r   r  s     r;   test_changing_member_failsz%_EnumTests.test_changing_member_fails  s1    ==~.#1DMM  /..	   =Ac                      j                   } j                  |j                  |        j                   j                  d   |v        t               t        t        fvr j                  d|v        |j                  } j                  ||        G d dt              } j                  |j                  |       |j                  t        u rP G  fdd j                        } j                  |j                   |        j                  |j"                  |       y  G  fdd j                        } j                  |j                   |        j                  |j"                  |       y )	Nr   r  c                   (    e Zd Z e       Z e       Zy)._EnumTests.test_contains_tf.<locals>.OtherEnumN)rE   rF   rG   r   onetworK   r=   r;   	OtherEnumr    s    &C&Cr=   r  c                   N    e Zd ZW  j                  d   ZW  j                  d   Zy)1_EnumTests.test_contains_tf.<locals>.NotEqualEnumr   rB   NrE   rF   rG   rG  thisthatr   s   r;   NotEqualEnumr    #    ))!,))!,r=   r  c                   N    e Zd ZW  j                  d   ZW  j                  d   Zy)._EnumTests.test_contains_tf.<locals>.EqualEnumr   rB   Nr  r   s   r;   	EqualEnumr    r  r=   r  )r  assertInr  r   r8  typeTestStrEnumClassTestStrEnumFunctionr   r  r   assertNotInr  rX  objectr  r  r  )r   r  valr  r  r  s   `     r;   test_contains_tfz_EnumTests.test_contains_tf  s   ==hnnh/A(23:.0CDDW01mmc8$	 	 	1!!V+-t~~ - \..9\..9-DNN - MM)..(3MM)..(3r=   c                    | j                   } G d dt              }| j                  |j                  |       | j                  |j                  |       | j                  |j
                  |       | j                  |j                  |       | j                  |j                  |       | j                  |j
                  |       | j                  |j                  |       | j                  |j                  |       | j                  |j
                  |       | j                  |j                  |       | j                  |j                  |       | j                  |j
                  |       y )Nc                       e Zd ZdZdZdZy)K_EnumTests.test_contains_same_name_diff_enum_diff_values.<locals>.OtherEnumbrandnewr8  NrE   rF   rG   r  r  r	  rK   r=   r;   r  r    s    EFEr=   r  )r  r   r  r  r  r	  r  )r   r  r  s      r;   -test_contains_same_name_diff_enum_diff_valuesz8_EnumTests.test_contains_same_name_diff_enum_diff_values  s   ==	 	
 	hnnh/hoox0hnnh/3)43iooy1i&&	2iooy1(3))84(3r=   c                     | j                   }| j                  t        t        |            t        t	        |                   y r   )r  r   setdirenum_dirr   r  s     r;   test_dir_on_classz_EnumTests.test_dir_on_class	  s,    ]]SWs8B<'89r=   c                     | j                   }| j                  t        t        |j                              t        t        |j                                     y r   )r  r   r  r  r  
member_dirr  s     r;   test_dir_on_itemz_EnumTests.test_dir_on_item  s6    ]]S]+SBHH1E-FGr=   c                      G d d| j                         }| j                  dt        |      v       | j                  dt        |j                        v        y )Nc                   .    e Zd Z e       Z e       Zd Zy)5_EnumTests.test_dir_with_added_behavior.<locals>.Testc                      d| j                   z  S )NzWowser! I'm %s!r  r   s    r;   wowserz<_EnumTests.test_dir_with_added_behavior.<locals>.Test.wowser  s    )DII56r=   N)rE   rF   rG   r   r  theser  rK   r=   r;   Testr    s    6DFE7r=   r  r  )r  r   r  r  )r   r  s     r;   test_dir_with_added_behaviorz'_EnumTests.test_dir_with_added_behavior  sB    	74>> 	7
 	D	12C		N23r=   c                      G d d| j                         } G d d|      }| j                  dt        |      v       | j                  dt        |j                        v        y )Nc                       e Zd Zd Zy)D_EnumTests.test_dir_on_sub_with_behavior_on_super.<locals>.SuperEnumc                      y)Nzdid you see me?rK   r   s    r;   	invisiblezN_EnumTests.test_dir_on_sub_with_behavior_on_super.<locals>.SuperEnum.invisible  s    (r=   N)rE   rF   rG   r  rK   r=   r;   	SuperEnumr    s    )r=   r  c                       e Zd Z e       Zy)B_EnumTests.test_dir_on_sub_with_behavior_on_super.<locals>.SubEnumN)rE   rF   rG   r   samplerK   r=   r;   SubEnumr    s	    VFr=   r  r  r  r   r  r  r   r  r  s      r;   &test_dir_on_sub_with_behavior_on_superz1_EnumTests.test_dir_on_sub_with_behavior_on_super  sM    	) 	)	i 	3w<78s7>>'::;r=   c                       G  fdd j                         } G  fdd|      } j                  dt        |      v        j                  dt        |j                        v t        |j                               y )Nc                       e Zd Z fdZy)\_EnumTests.test_dir_on_sub_with_behavior_including_instance_dict_on_super.<locals>.SuperEnumc                     j                   j                  j                  }j                   j                  t        u r	 ||       }n&t	        |d   t
              r|d   \  }n|} || g| }t        |      dk(  r|d   n||_        d|_        |S )Nr   rB   ztest description)	r  rX  r{  r  
isinstancetuplelen_value_description)ri  r`  kwdsr  r{   create_valuer   s         r;   r{  zd_EnumTests.test_dir_on_sub_with_behavior_including_instance_dict_on_super.<locals>.SuperEnum.__new__'  s    nn22::>>//69c(C!%(E2(-a',c1L1C*-e*/eAhu"4
r=   NrE   rF   rG   r{  r   s   r;   r  r  &  s    r=   r  c                   .    e Zd ZW  j                  d   Zy)Z_EnumTests.test_dir_on_sub_with_behavior_including_instance_dict_on_super.<locals>.SubEnumrB   N)rE   rF   rG   rG  r  r   s   r;   r  r  4  s    ''*Fr=   r  r  r  r  s   `  r;   >test_dir_on_sub_with_behavior_including_instance_dict_on_superzI_EnumTests.test_dir_on_sub_with_behavior_including_instance_dict_on_super$  sY    	 		+i 	+S\9:W^^)<<c'..>QRr=   c                 |    | j                  t        d      5  | j                  d       d d d        y # 1 sw Y   y xY w)Nz#<.... 'NewBaseEnum'> has no membersr   )r   r  r.  r   s    r;   test_empty_enum_has_no_valuesz(_EnumTests.test_empty_enum_has_no_values9  s.    ##I/TUQ VUUs   2;c                 t    | j                   }| j                   ||j                        |j                         y r   )r  r  r  )r   Mains     r;   test_enum_in_enum_outz _EnumTests.test_enum_in_enum_out=  s&    }}d4::&

3r=   c                     | j                   }| j                  }| j                  t        |j                  d         t
        u        | j                  t        |j                  d         t
        u        y )Nr9  )r;  rA  r   r  __dict__r@  )r   lazybusys      r;   test_gnv_is_staticz_EnumTests.test_gnv_is_staticA  sT    ||||T]]+BCDTUT]]+BCDTUr=   c                     | j                   }i }d||j                  <   d||j                  <   d||j                  <   | j	                  ||j                     d       y )N122503150704)r  r  r  r	  r   )r   r  mappings      r;   	test_hashz_EnumTests.test_hashG  sS    =="(#) "(16:r=   c                 z   | j                  t              5   G d d| j                        }d d d        | j                  t              5   G d d| j                        }d d d        | j                  t              5   G d d| j                        }d d d        | j                  t              5   G d d| j                        }d d d        | j                  t              5   G d d| j                        }d d d        y # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   axY w# 1 sw Y   y xY w)Nc                       e Zd ZdZy,_EnumTests.test_invalid_names.<locals>.Wrong	   N)rE   rF   rG   mrorK   r=   r;   Wrongr  Q      r=   r  c                       e Zd ZdZy)r     N)rE   rF   rG   _create_rK   r=   r;   r  z,_EnumTests.test_invalid_names.<locals>.WrongT  s    r=   c                       e Zd ZdZyr  )rE   rF   rG   _get_mixins_rK   r=   r;   r  z,_EnumTests.test_invalid_names.<locals>.WrongW  s     r=   c                       e Zd ZdZy)r  rB   N)rE   rF   rG   
_find_new_rK   r=   r;   r  z,_EnumTests.test_invalid_names.<locals>.WrongZ      
r=   c                       e Zd ZdZyr  )rE   rF   rG   
_any_name_rK   r=   r;   r  z,_EnumTests.test_invalid_names.<locals>.Wrong]  r  r=   )rp  r   r  r   r  s     r;   test_invalid_namesz_EnumTests.test_invalid_namesO  s    z*  + z*  + z*! ! + z*  + z*  +* +* +* +* +* +*s;   D	D<D/D%"D1D
DD"%D.1D:c                 ~      G  fdd j                         } j                  t        |j                        d       y)z=check that setting __str__ to object's is not reset to Enum'sc                   L    e Zd ZW  j                  d   Zd Zej                  Zy)4_EnumTests.test_object_str_override.<locals>.Genericr'   c                      | j                   dS )Nz.test_name_r   s    r;   __repr__z=_EnumTests.test_object_str_override.<locals>.Generic.__repr__d  s    $(KK22r=   N)rE   rF   rG   rG  itemr	  r  r  r   s   r;   Genericr  b  s!    %%a(D3nnGr=   r  z	item.testN)r  r   rY  r
  r   r  s   ` r;   test_object_str_overridez#_EnumTests.test_object_str_override`  s.    	%dnn 	%
 	W\\*K8r=   c                 8   | j                   }| j                  t        |j                        |j                  j                  j                                | j                  t        |j                        |j                  j                  j                                y r   )r  r   rY  r  r   r  r_  )r   NSs     r;   test_overridden_strz_EnumTests.test_overridden_stri  s^    __RXX(;(;(=>)288==+>+>+@Ar=   c                 L   | j                   }| j                  t        |j                        |j                  j                  j                                | j                  t        |j                        dj                  t        |j                  j                                     y r$  )	r)  r   rY  r  r   r"  r_  r1   r'  )r   NSFs     r;   test_overridden_str_formatz%_EnumTests.test_overridden_str_formatn  se    ##SYY)=)=)?@		*BGGHSYY^^4L,MNr=   c                 L   | j                   }| j                  t        |j                        |j                  j                  j                                | j                  t        |j                        dj                  t        |j                  j                                     y r$  )	r1  r   rY  r  r   r"  r_  r1   r'  )r   NSEs     r;   $test_overridden_str_format_inheritedz/_EnumTests.test_overridden_str_format_inheriteds  sc    ooSYY)=)=)?@		*BGGHSYY^^4L,MNr=   c                 ^   | j                  dd      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  |j                  |j
                  |j                  g|       | j                  }| j                   t        u rg d}t        dj                         |      D ]  \  }}||   }| j                  |j                  |t        |             | j                  |j                  |       |j                  t        ur)t        ||j                        r| j                  ||       n| j!                  ||       | j#                  ||       | j%                  t'        |      |       | j%                  | ||              y )N	MinorEnumjune july augustrC   junejulyaugustr  r   r   r  r  r  r  r8  r	   r  splitr`  r   rX  r  r
  assertNotEqualr  r  r  r   r  lstr8  monthaves          r;   !test_programmatic_function_stringz,_EnumTests.test_programmatic_function_stringx  sV   NN;0BC	9oS3y>2YI61A1AB	 >>W$-F/557@IE2% AQWWb$y/:QVVU+&&f4IyOfOf9g  B'##Ar*MM!Y'MM$q'9-MM!Yr]+ Ar=   c                 N   | j                  dg d      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  |j                  |j
                  |j                  g|       | j                  }| j                   t        u rg d}t        dj                         |      D ]  \  }}||   }| j                  |j                  |       | j                  |j                  |       |j                  t        ur)t        ||j                        r| j                  ||       n| j!                  ||       | j#                  ||       | j%                  t'        |      |       | j%                  | ||              y )Nr  r  rC   r  r  r!  s          r;   &test_programmatic_function_string_listz1_EnumTests.test_programmatic_function_string_list  sP   NN;0JK	9oS3y>2YI61A1AB	 >>W$-F/557@IE2% AQWWb)QVVU+&&f4IyOfOf9g  B'##Ar*MM!Y'MM$q'9-MM!Yr]+ Ar=   c                 z   | j                  dd| j                  d   fd| j                  d   fd| j                  d   ff      }t        |      }| j                  t	        |      t	        |             | j                  t	        |      d|       | j                  |j
                  |j                  |j                  g|       t        d	j                         | j                        D ]  \  }}||   }| j                  |j                  |       | j                  |j                  |       |j                  t        ur)t        ||j                        r| j                  ||       n| j!                  ||       | j#                  ||       | j%                  t'        |      |       | j%                  | ||              y 
Nr  r  r   r  rB   r  r'   rC   r  )r  rG  r   r   r  r  r  r  r  r  r8  r`  r   rX  r  r
  r   r  r  r  r   r  r"  r#  r$  r%  s         r;   #test_programmatic_function_iterablez._EnumTests.test_programmatic_function_iterable  sy   NN$,,Q/064;M;Ma;P2QT\^b^p^pqr^sStu	 9oS3y>2YI61A1AB	 /557EIE2% AQWWb)QVVU+&&f4IyOfOf9g  B'##Ar*MM!Y'MM$q'9-MM!Yr]+ Fr=   c           
         | j                  dt        d| j                  d   fd| j                  d   fd| j                  d   ff            }t        |      }| j	                  t        |      t        |             | j	                  t        |      d|       | j	                  |j                  |j                  |j                  g|       t        d	j                         | j                        D ]  \  }}||   }|j                  t        ur)t        ||j                        r| j	                  ||       n| j                  ||       | j!                  ||       | j#                  t%        |      |       | j#                  | ||              y r*  )r  r   rG  r   r   r  r  r  r  r  r  r8  rX  r  r
  r   r  r  r  r+  s         r;   $test_programmatic_function_from_dictz/_EnumTests.test_programmatic_function_from_dict  sa   NNfd&8&8&;<vtGYGYZ[G\>]`hjnj|j|}~j  `A  B  C	 9oS3y>2YI61A1AB	 /557EIE2% A&&f4IyOfOf9g  B'##Ar*MM!Y'MM$q'9-MM!Yr]+ Fr=   c           	         | j                   }| j                  rl| j                  t         |d            d       | j                  t        |j                        d       | j                  t        | j
                        d       nwt        |t              r&| j                  t        |j                        d       nA| j                  t        |j                        d| j                  d   d|j                         t        | j                  | j                  |d	
      D ]<  \  }}}| j                  t        |      d|j                  d|j                  d       > y )Nr   z<MainEnum: 0>z<MainEnum.dupe: 3>z<MainEnum.first|third: 5>z<MainEnum.third: 'third'>z<MainEnum.third: r'   >Tr  z
<MainEnum.z: )r  rV  r   r  r  rZ  r
  r	   r8  _value_repr_r  rW  r   r`  r   r  r   r`  r   s        r;   	test_reprz_EnumTests.test_repr  s    ]]<<T"Q%[/:T"''],@AT$**-/JKG$T"''],GHT"'']dkkRSn,WY[YhYhi#&tzz4;;4#PD%T&\&++v||+\] $Qr=   c                 x     G d d| j                         }| j                  t        |j                        d       y )Nc                   <    e Zd Z e       Z e       Z e       Zd Zy)._EnumTests.test_repr_override.<locals>.Genericc                      d| j                   z  S )Nz!don't you just love shades of %s?r  r   s    r;   r	  z7_EnumTests.test_repr_override.<locals>.Generic.__repr__  s    :TYYFFr=   N)rE   rF   rG   r   r  r  r	  r	  rK   r=   r;   r  r6    s    FEVFFEGr=   r  z$don't you just love shades of third?)r  r   r  r	  r  s     r;   test_repr_overridez_EnumTests.test_repr_override  s3    	Gdnn 	G 	W]]#6	r=   c                      G d d| j                         } G d d|      }| j                  t        |j                        d       y )Nc                       e Zd Zd Zy)._EnumTests.test_inherited_repr.<locals>.MyEnumc                      d| j                   z  S )NzMy name is %s.r  r   s    r;   r	  z7_EnumTests.test_inherited_repr.<locals>.MyEnum.__repr__  s    '$))33r=   NrE   rF   rG   r	  rK   r=   r;   r   r;        4r=   r   c                   6    e Zd Z e       Z e       Z e       Zy)1_EnumTests.test_inherited_repr.<locals>.MySubEnumN)rE   rF   rG   r   r  r  theotherrK   r=   r;   	MySubEnumr@    s    6D6DvHr=   rB  zMy name is that.)r  r   r  r  )r   r   rB  s      r;   test_inherited_reprz_EnumTests.test_inherited_repr  s:    	4T^^ 	4	 	 	inn-/ABr=   c                      G d dt               } G d d|t              }| j                  t        |j                        d       y )Nc                       e Zd Zy)C_EnumTests.test_multiple_superclasses_repr.<locals>._EnumSuperClassNr   rK   r=   r;   _EnumSuperClassrF    r   r=   rG  	metaclassc                       e Zd ZdZy)5_EnumTests.test_multiple_superclasses_repr.<locals>.ErB   N)rE   rF   rG   ArK   r=   r;   ErK        Ar=   rM  z<E.A: 1>)r   r   r   r  rL  )r   rG  rM  s      r;   test_multiple_superclasses_reprz*_EnumTests.test_multiple_superclasses_repr  s4    	 		 	accJ/r=   c                     | j                  t        t        | j                              | j                  j                  | j                  j
                  | j                  j                  g       y r   )r   r   r'  r  r	  r  r  r   s    r;   test_reversed_iteration_orderz(_EnumTests.test_reversed_iteration_order   sI    Xdmm,-$$dmm&:&:DMM<O<OP	r=   )&rE   rF   rG   r   r8  r]  rb  rd  rt  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r&  r(  r,  r.  r3  r8  rC  rO  rQ  rK   r=   r;   r   r      s     FHQTIH#(	$IL$2
4:4,:H4<S* 4V;"9B
O
O
,0,0,0,,^
C0r=   r   c                   $    e Zd Zd Zd Zd Zd Zy)_PlainOutputTestsc                    | j                   }| j                  rl| j                  t         |d            d       | j                  t        |j                        d       | j                  t        | j
                        d       n%| j                  t        |j                        d       t        | j                  | j                  |d      D ].  \  }}}| j                  t        |      d|j                         0 y )	Nr   zMainEnum(0)MainEnum.dupeMainEnum.first|thirdMainEnum.thirdTr  	MainEnum.
r  rV  r   rY  r  rZ  r  rW  r8  r   r2  s        r;   test_strz_PlainOutputTests.test_str  s    ]]<<SAZ7S\?;S_.DES\+;<#&tzz4;;4#PD%S[6;;*IJ $Qr=   c                    | j                   }| j                  rK| j                  t        |j                        d       | j                  t        | j
                        d       n%| j                  t        |j                        d       t        | j                  | j                  |d      D ].  \  }}}| j                  t        |      d|j                         0 y NrU  rV  rW  Tr  rX  
r  rV  r   r_  r  rZ  r  rW  r8  r   r2  s        r;   test_formatz_PlainOutputTests.test_format      ]]<<VBGG_o>VDJJ/1GHVBGG_.>?#&tzz4;;4#PD%VF^fkk-LM $Qr=   c                     | j                   }| j                  t        |j                        d|j                  d|j                         | j                  t        |j                        d       y )NNewFormatEnum.first FIRST)r  r   rY  r  r  r_  r   NFs     r;   test_overridden_formatz(_PlainOutputTests.test_overridden_format  sQ    RXX(="**VXV^V^?_`)73r=   c                    | j                   }| j                  d|j                         | j                  d|j                         | j                  d|j                         | j                  d|j                         | j                  d|j                         | j                  d|j                         | j                  d|j                         y N{}{:}{:20}{:^20}{:>20}{:<20}{:5.2})r  rd  r  r  s     r;   test_format_specsz#_PlainOutputTests.test_format_specs"  s    ]]tRYY/ubii0w		2x3x3x3x3r=   NrE   rF   rG   rZ  r^  rf  rp  rK   r=   r;   rS  rS    s    	KN4
4r=   rS  c                   $    e Zd Zd Zd Zd Zd Zy)_MixedOutputTestsc                    | j                   }| j                  rK| j                  t        |j                        d       | j                  t        | j
                        d       n%| j                  t        |j                        d       t        | j                  | j                  |d      D ].  \  }}}| j                  t        |      d|j                         0 y r\  rY  r2  s        r;   rZ  z_MixedOutputTests.test_str/  s    ]]<<S\?;S_.DES\+;<#&tzz4;;4#PD%S[6;;*IJ $Qr=   c                    | j                   }| j                  rK| j                  t        |j                        d       | j                  t        | j
                        d       n%| j                  t        |j                        d       t        | j                  | j                  |d      D ].  \  }}}| j                  t        |      d|j                         0 y r\  r]  r2  s        r;   r^  z_MixedOutputTests.test_format9  r_  r=   c                     | j                   }| j                  t        |j                        d       | j                  t	        |j                        d       y )Nra  rc  )r  r   rY  r  r_  rd  s     r;   rf  z(_MixedOutputTests.test_overridden_formatC  s?    RXX(=>)73r=   c                    | j                   }| j                  d|j                         | j                  d|j                         | j                  d|j                         | j                  d|j                         | j                  d|j                         | j                  d|j                         | j                  d|j                         y rh  )r  rd  r  r  s     r;   rp  z#_MixedOutputTests.test_format_specsH  s    ]]tRXX.ubhh/w1x2x2x2x2r=   Nrq  rK   r=   r;   rs  rs  -  s    KN4
3r=   rs  c                   0    e Zd Zd Zd Zd Zd Zd Zd Zy)_MinimalOutputTestsc                    | j                   }| j                  rK| j                  t        |j                        d       | j                  t        | j
                        d       n;| j                  t        |j                        t        | j                  d                t        | j                  | j                  |d      D ]*  \  }}}| j                  t        |      t        |             , y NrD  5r'   Tr  )	r  rV  r   rY  r  rZ  r8  r  rW  r2  s        r;   rZ  z_MinimalOutputTests.test_strU  s    ]]<<S\3/S_c2S\3t{{1~+>?#&tzz4;;4#PD%S[#e*5 $Qr=   c                    | j                   }| j                  rK| j                  t        |j                        d       | j                  t        | j
                        d       n;| j                  t        |j                        t        | j                  d                t        | j                  | j                  |d      D ]*  \  }}}| j                  t        |      t        |             , y r{  )	r  rV  r   r_  r  rZ  r8  r  rW  r2  s        r;   r^  z_MinimalOutputTests.test_format_  s    ]]<<VBGG_c2VDJJ/5VBGG_fT[[^.DE#&tzz4;;4#PD%VF^VE]; $Qr=   c                     | j                   }| j                  t        |j                        t        | j                  d                | j                  t        |j                        d       y )Nr   rc  )r  r   rY  r  r8  r_  rd  s     r;   rf  z*_MinimalOutputTests.test_overridden_formati  sK    RXXDKKN(;<)73r=   c                 :   | j                   }| j                  d|j                         | j                  d|j                         | j                  d|j                         | j                  d|j                         | j                  d|j                         | j                  d|j                         |j                  t        u rU| j                  d|j                         | j                  d|j                         | j                  d	|j                         y y )
Nri  rj  rk  rl  rm  rn  z{:n}ro  z{:f})r  rb  r	  rX  floatr  s     r;   rp  z%_MinimalOutputTests.test_format_specsn  s    ]]  rxx0  1  "((3  2884  2884  2884u$$$VRXX6$$Xrxx8$$VRXX6 %r=   c                     | j                   }t        j                  |      }| j                  ||       | j                  ||       t        j                  |      }| j                  ||       | j                  ||       y r   )r  copyr   r  deepcopyr   r  copieddeeps       r;   	test_copyz_MinimalOutputTests.test_copy{  sb    ]]2$fb!}}R r"dBr=   c                    | j                   }t        j                  |j                        }| j                  ||j                         t        j                  |j                        }| j                  ||j                         y r   )r  r  r  r  r  r  s       r;   test_copy_memberz$_MinimalOutputTests.test_copy_member  sS    ]]288$fbhh'}}RXX&dBHH%r=   N)	rE   rF   rG   rZ  r^  rf  rp  r  r  rK   r=   r;   ry  ry  S  s     6<4
7 &r=   ry  c                       e Zd Zd Zd Zd Zy)
_FlagTestsc                     | j                  t        d      5 }| j                  d       d d d        | j                  j                  j
                  d        y # 1 sw Y   0xY w)Nz'RED' is not a valid RED)r   r   r  r  rz   __context__)r   ctxs     r;   *test_default_missing_with_wrong_type_valuez5_FlagTests.test_default_missing_with_wrong_type_value  sQ    ### MM% 	
 	cmm//6 s   AA!c                 B    G d d| j                         }|\  }}|j                  }| j                  | |       | j                  | |       | j                  ||z    |d             | j                  |  |d             | j                   |d       ||z          G d d| j                         }|\  }}}|j                  }	| j                  | ||z         | j                  | ||z         | j                  | ||z         | j                  ||z   |       | j                  ||z   |       | j                  ||z   |       | j                  ||z  |z    |d             | j                  |	  |d             | j                   |d       ||z  |z         y )Nc                       e Zd ZdZdZdZy)<_FlagTests.test_closed_invert_expectations.<locals>.ClosedABrB   r'   rC   NrE   rF   rG   rL  BMASKrK   r=   r;   ClosedABr    s    AADr=   r  r   c                       e Zd ZdZdZdZdZy)=_FlagTests.test_closed_invert_expectations.<locals>.ClosedXYZrS   r'   rB   r   NrE   rF   rG   XYZr  rK   r=   r;   	ClosedXYZr    s    AAADr=   r  )r  r  r  )
r   r  rL  r  AB_MASKr  r  r  r  XYZ_MASKs
             r;   test_closed_invert_expectationsz*_FlagTests.test_closed_invert_expectations  st   	t~~ 	 1--qb!qb!!fhqk*wh,x{lQqS*	 	
 1a>>qb!A#qb!A#qb!A#!fa !fa !fa !Ah	!-xi1.y|mac!e-r=   c                     G d d| j                         }|\  }}|j                  }|j                  t        t        fv r| j                  |  |d             | j                  |  |d             | j                  ||z    |d             | j                  |  |d             | j                   |d       |       nw| j                  | |       | j                  | |       | j                  ||z    |d             | j                  |  |d             | j                   |d       ||z          G d d| j                         }|\  }}}|j                  }	|j                  t        t        fv r| j                  |  |d	             | j                  |  |d
             | j                  |  |d             | j                  ||z    |d             | j                  ||z    |d             | j                  ||z    |d             | j                  ||z  |z    |d             | j                  |	  |d             | j                   |d       |	       y | j                  | ||z         | j                  | ||z         | j                  | ||z         | j                  ||z   |       | j                  ||z   |       | j                  ||z   |       | j                  ||z  |z    |d             | j                  |	  |d             | j                   |d       ||z  |z         y )Nc                       e Zd ZdZdZdZy)8_FlagTests.test_open_invert_expectations.<locals>.OpenABrB   r'      Nr  rK   r=   r;   OpenABr    s    AADr=   r           r   c                       e Zd ZdZdZdZdZy)9_FlagTests.test_open_invert_expectations.<locals>.OpenXYZrS   r'   rB      Nr  rK   r=   r;   OpenXYZr    s    AAADr=   r                       )r  r  
_boundary_r   r   r  r   )
r   r  rL  r  r  r  r  r  r  r  s
             r;   test_open_invert_expectationsz(_FlagTests.test_open_invert_expectations  s   	T^^ 	 1++-MM1"fSk*MM1"fSk*MMAaC&&+.MM7(F1I.MM6!9*g.MM1"a MM1"a MMAaC&&),MM7(F1I.MM6!9*qs,	dnn 	
 1a<<%.MM1"gbk*MM1"gbk*MM1"gbk*MMAaC&'"+.MMAaC&'"+.MMAaC&'"+.MMAaCE(GBK0MM8)WQZ0OOWQZK2MM1"ac"MM1"ac"MM1"ac"MMAaC&!$MMAaC&!$MMAaC&!$MMAaCE(GAJ/MM8)WQZ0OOWQZK!A#a%1r=   N)rE   rF   rG   r  r  r  rK   r=   r;   r  r    s    7.@02r=   r  c                       e Zd ZeZy)TestPlainEnumClassNrE   rF   rG   r   r  rK   r=   r;   r  r        Ir=   r  c                       e Zd ZeZy)TestPlainEnumFunctionNr  rK   r=   r;   r  r    r  r=   r  c                       e Zd ZeZd Zy)TestPlainFlagClassc                     G d dt               }| j                  |j                  j                  d       | j	                  |j
                  j                  d        | j                  t        d      5  |j                  |j
                  z   d d d        | j                  t        d      5  |j
                  |j                  z   d d d        | j                  t        d      5  |j                  |j
                  z   d d d        | j                  t        d      5  |j
                    d d d        y # 1 sw Y   xY w# 1 sw Y   zxY w# 1 sw Y   NxY w# 1 sw Y   y xY w)Nc                       e Zd ZdZdZy)?TestPlainFlagClass.test_none_member.<locals>.FlagWithNoneMemberrB   N)rE   rF   rG   rL  rM  rK   r=   r;   FlagWithNoneMemberr    s    AAr=   r  rB   zA'FlagWithNoneMember.E' cannot be combined with other flags with |zA'FlagWithNoneMember.E' cannot be combined with other flags with &zB'FlagWithNoneMember.E' cannot be combined with other flags with \^z)'FlagWithNoneMember.E' cannot be inverted)r   r   rL  r`  r  rM  r   r  )r   r  s     r;   test_none_memberz#TestPlainFlagClass.test_none_member  s   	 	 	+--33Q7(**00$7##I/st  #5#7#77 u##I/st  #5#7#77 u##I/tu  #5#7#77 v##I/[\!!! ]\ utttuu\\s0   2D1*D="E	E1D:=E	EEN)rE   rF   rG   r   r  r  rK   r=   r;   r  r    s    I"r=   r  c                       e Zd ZeZy)TestPlainFlagFunctionN)rE   rF   rG   r   r  rK   r=   r;   r  r    r  r=   r  c                       e Zd ZeZd Zy)TestIntEnumClassc                      G d dt               }| j                  |j                  j                  d       | j	                  |j                  j                  |j                         y )Nc                       e Zd ZdZdZy)3TestIntEnumClass.test_shadowed_attr.<locals>.NumberrB   r'   N)rE   rF   rG   divisor	numeratorrK   r=   r;   Numberr    s    GIr=   r  rB   r   r   r  r  r  r   r  s     r;   test_shadowed_attrz#TestIntEnumClass.test_shadowed_attr  sH    	W 	 	1115f&&..?r=   NrE   rF   rG   r   r  r  rK   r=   r;   r  r    s    I@r=   r  c                       e Zd ZeZd Zy)TestIntEnumFunctionc                     t        dd      }| j                  |j                  j                  d       | j	                  |j                  j                  |j                         y )Nr  )r  r  rB   r  r  s     r;   r  z&TestIntEnumFunction.test_shadowed_attr  sG    #;<1115f&&..?r=   Nr  rK   r=   r;   r  r    s    I@r=   r  c                       e Zd ZeZd Zy)r  c                 *    G d dt               }| j                  |j                  j                         d       | j                  |j                  j                         d       | j	                  |j                  j                  |j                         y )Nc                       e Zd ZdZdZy)1TestStrEnumClass.test_shadowed_attr.<locals>.Bookauthorr"  N)rE   rF   rG   r  r"  rK   r=   r;   Bookr  "  s    FEr=   r  AuthorTitler	   r   r  r"  r  r   r  s     r;   r  z#TestStrEnumClass.test_shadowed_attr!  sf    	7 	 	**,h7))+W5djj''5r=   NrE   rF   rG   r	   r  r  rK   r=   r;   r  r    s    I6r=   r  c                       e Zd ZeZd Zy)r  c                 $   t        dd      }| j                  |j                  j                         d       | j                  |j                  j                         d       | j	                  |j                  j                  |j                         y )Nr  )r  r"  r  r  r  r  s     r;   r  z&TestStrEnumFunction.test_shadowed_attr.  se    v23**,h7))+W5djj''5r=   Nr  rK   r=   r;   r  r  +  s    I6r=   r  c                       e Zd ZeZy)TestIntFlagClassNrE   rF   rG   r   r  rK   r=   r;   r  r  6      Ir=   r  c                       e Zd ZeZy)TestIntFlagFunctionNr  rK   r=   r;   r  r  :  r  r=   r  c                   $    e Zd Z G d dee      Zy)TestMixedIntClassc                       e Zd Zy)TestMixedIntClass.enum_typeNr   rK   r=   r;   r  r  ?      r=   r  N)rE   rF   rG   intr   r  rK   r=   r;   r  r  >      $C$r=   r  c                        e Zd Z ede      Zy)TestMixedIntFunctionr  r  N)rE   rF   rG   r   r  r  rK   r=   r;   r  r  B      [s+Ir=   r  c                   $    e Zd Z G d dee      Zy)TestMixedStrClassc                       e Zd Zy)TestMixedStrClass.enum_typeNr   rK   r=   r;   r  r  G  r  r=   r  N)rE   rF   rG   rY  r   r  rK   r=   r;   r  r  F  r  r=   r  c                        e Zd Z ede      Zy)TestMixedStrFunctionr  r  N)rE   rF   rG   r   rY  r  rK   r=   r;   r  r  J  r  r=   r  c                   $    e Zd Z G d dee      Zy)TestMixedIntFlagClassc                       e Zd Zy)TestMixedIntFlagClass.enum_typeNr   rK   r=   r;   r  r  O  r  r=   r  N)rE   rF   rG   r  r   r  rK   r=   r;   r  r  N  r  r=   r  c                        e Zd Z ede      Zy)TestMixedIntFlagFunctionr  r  N)rE   rF   rG   r   r  r  rK   r=   r;   r  r  R  r  r=   r  c                   f    e Zd Z eddd       eddd       eddd	      gZg d
Z G d dee      Zy)TestMixedDateClass     r    rC        r  r  )r  r  r  )r  rC   r  )r  r  r  c                       e Zd Zed        Zy)TestMixedDateClass.enum_typec                     g d}||   S Nr  rK   r   r6  countlast_valuesr8  s        r;   r9  z2TestMixedDateClass.enum_type._generate_next_value_\  s    DF%= r=   Nr?  rK   r=   r;   r  r  [  s    		! 
	!r=   r  N)rE   rF   rG   r   r8  rG  r   r  rK   r=   r;   r   r   V  s<    4R $tQ"3T$B5GHFCM!D$ !r=   r   c                   n    e Zd Z eddd       eddd       eddd	      gZg d
Zd Z eddeie      Zy)TestMixedDateFunctionr  r  r  r  rC   r  r  r  r  r  c                     g d}||   S r
  rK   r  s        r;   r9  z+TestMixedDateFunction._generate_next_value_h  s    @e}r=   r  r9  r  N)	rE   rF   rG   r   r8  rG  r9  r   r  rK   r=   r;   r  r  b  sK    4R $tQ"3T$B5GHFCM [#:;P"QX\]Ir=   r  c                   f    e Zd Z eddd       eddd       eddd      gZg dZ G d	 d
ee      Zy)TestMinimalDateClass  r  rB     r'   r    )r  r  rB   )r  r'   r  )r  rB   rB   c                       e Zd Zd Zy)TestMinimalDateClass.enum_typec                     g d}||   S Nr  rK   r  s        r;   r9  z4TestMinimalDateClass.enum_type._generate_next_value_v  s    AF%= r=   Nr:  rK   r=   r;   r  r  t  s    	!r=   r  N)rE   rF   rG   r   r8  rG  r   r  rK   r=   r;   r  r  o  s<    4QdAr!2Dq!4DEF@M!D( !r=   r  c                   x    e Zd Z eddd       eddd       eddd      gZg dZed	        Z ed
deie      Z	y)TestMinimalDateFunctionr  r  rB   r  r'   r  r  r  c                     g d}||   S r  rK   r  s        r;   r9  z-TestMinimalDateFunction._generate_next_value_  s    =e}r=   r  r9  r  N)
rE   rF   rG   r   r8  rG  r@  r9  r   r  rK   r=   r;   r  r  {  sX    4QdAr!2Dq!4DEF@M  '>?T&U\`aIr=   r  c                   ,    e Zd Zg dZ G d dee      Zy)TestMixedFloatClassg?g@gffffff
@c                       e Zd Zd Zy)TestMixedFloatClass.enum_typec                     g d}||   S Nr   rK   r  s        r;   r9  z3TestMixedFloatClass.enum_type._generate_next_value_      $F%= r=   Nr:  rK   r=   r;   r  r"        	!r=   r  N)rE   rF   rG   r8  r  r   r  rK   r=   r;   r  r    s    F!E4 !r=   r  c                   4    e Zd Zg dZd Z eddeie      Zy)TestMixedFloatFunctionr   c                     g d}||   S r$  rK   r  s        r;   r9  z,TestMixedFloatFunction._generate_next_value_       e}r=   r  r9  r  N)rE   rF   rG   r8  r9  r   r  r  rK   r=   r;   r(  r(    s$    F [#:;P"QX]^Ir=   r(  c                   ,    e Zd Zg dZ G d dee      Zy)TestMinimalFloatClassg@g      @gffffff@c                       e Zd Zd Zy)TestMinimalFloatClass.enum_typec                     g d}||   S Nr-  rK   r  s        r;   r9  z5TestMinimalFloatClass.enum_type._generate_next_value_  r%  r=   Nr:  rK   r=   r;   r  r/    r&  r=   r  N)rE   rF   rG   r8  r  r   r  rK   r=   r;   r,  r,    s    F!E8 !r=   r,  c                   4    e Zd Zg dZd Z eddeie      Zy)TestMinimalFloatFunctionr-  c                     g d}||   S r1  rK   r  s        r;   r9  z.TestMinimalFloatFunction._generate_next_value_  r*  r=   r  r9  r  N)rE   rF   rG   r8  r9  r   r  r  rK   r=   r;   r3  r3    s$    F '>?T&U\abIr=   r3  c                      e Zd ZdZd Zd Zd Z ej                  d      d        Z	d Z
d Zd	 Zd
 Z ej                  edk\  d      d        Z ej                  edk  d      d        Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d  Z"d! Z#d" Z$d# Z%d$ Z&d% Z'd& Z(d' Z)d( Z*d) Z+d* Z,d+ Z-d, Z.d- Z/d. Z0d/ Z1d0 Z2d1 Z3d2 Z4d3 Z5d4 Z6d5 Z7d6 Z8d7 Z9d8 Z:d9 Z;d: Z<d; Z=d< Z>d= Z?d> Z@d? ZAd@ ZBdA ZCdB ZDdC ZEdD ZFdE ZGdF ZHdG ZIdH ZJdI ZKdJ ZLdK ZMdL ZNdM ZOdN ZPdO ZQdP ZRdQ ZSdR ZTdS ZUdT ZVdU ZWdV ZXdW ZYdX ZZdY Z[dZ Z\d[ Z]d\ Z^d] Z_d^ Z`d_ Zad` Zbda Zcdb Zddc Zedd Zfde Zgdf Zhdg Zidh Zjdi Zkdj Zldk Zmdl Zndm Zoyn)oTestSpecialzM
    various operations that are not attributable to every possible enum
    c                      G d dt               }|| _         G d dt              }|| _         G d dt        t               }|| _        ddlm}  G d	 d
|t               }|| _        y )Nc                       e Zd ZdZdZdZdZy)!TestSpecial.setUp.<locals>.SeasonrB   r'   rC   rS   N)rE   rF   rG   rk  rl  rm  WINTERrK   r=   r;   rn  r9        FFFFr=   rn  c                        e Zd ZdZdZdZdZdZy)!TestSpecial.setUp.<locals>.GradesrE  rS   rC   r'   r   NrE   rF   rG   rL  r  CDFrK   r=   r;   Gradesr=        AAAAAr=   rB  c                       e Zd ZdZdZdZdZy)&TestSpecial.setUp.<locals>.DirectionaleastwestnorthsouthN)rE   rF   rG   EASTWESTNORTHSOUTHrK   r=   r;   DirectionalrE    s    DDEEr=   rN  r   r   c                       e Zd ZdZdZy)"TestSpecial.setUp.<locals>.Holiday)  rB   rB   )rQ  rC   r  N)rE   rF   rG   NEW_YEARIDES_OF_MARCHrK   r=   r;   HolidayrP    s    !H'Mr=   rT  )	r   rn  r   rB  rY  rN  datetimer   rT  )r   rn  rB  rN  r   rT  s         r;   r]  zTestSpecial.setUp  s^    	T 	
 	W 	 	#t 	
 '!	(dD 	( r=   c                     G d dt               }| j                  |j                         | j                  |j                          G d dt               }| j                  |j                         | j	                  |j                          G d dt
        t               }| j                  |j                         | j	                  |j                         y )Nc                       e Zd ZdZdZy)$TestSpecial.test_bool.<locals>.LogicTFNrE   rF   rG   truefalserK   r=   r;   LogicrX    s    DEr=   r\  c                       e Zd ZdZdZd Zy)(TestSpecial.test_bool.<locals>.RealLogicTFc                 ,    t        | j                        S r   )boolr  r   s    r;   __bool__z1TestSpecial.test_bool.<locals>.RealLogic.__bool__      DLL))r=   N)rE   rF   rG   rZ  r[  ra  rK   r=   r;   	RealLogicr^    s    DE*r=   rc  c                       e Zd ZdZdZy)'TestSpecial.test_bool.<locals>.IntLogicrB   r   NrY  rK   r=   r;   IntLogicre        DEr=   rf  )r   r   rZ  r[  r   r  )r   r\  rc  rf  s       r;   	test_boolzTestSpecial.test_bool  s    	D 	 	

#$	* 	*
 		')	sD 	 	&(r=   c                 <   | j                   }| j                  t              5  |j                  |j                  k   d d d        | j                  t              5  |j                  dkD   d d d        | j                  |j                  d        G d dt              }| j                  |j                  |j                         | j                  t              5  |j                  |j                  k   d d d        y # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   y xY w)NrS   rB   c                       e Zd ZdZdZdZy)*TestSpecial.test_comparisons.<locals>.PartrB   r'   rC   N)rE   rF   rG   rk  CLIPBARRELrK   r=   r;   Partrk    s    FDFr=   rn  )rn  rp  r  rk  r:  r   r   rl  )r   rn  rn  s      r;   test_comparisonszTestSpecial.test_comparisons  s    y)MMFMM) *y)MMA * 	FMM1-	4 	
 	FMM4;;7y)MMDII% *) *))) *)s#   C:DD:DDDz
to-do listc                     G d dt               }t        |      }| j                  d|       | j                  d|       | j                  d|       | j                  d|        G d dt               }t        |      }| j                  d|       | j                  d|       | j                  d|       | j                  d|       y )	Nc                       e Zd Zy);TestSpecial.test_dir_with_custom_dunders.<locals>.PlainEnumNr   rK   r=   r;   	PlainEnumrr    r   r=   rs  r	  r  r  r   c                   $    e Zd Zd Zd Zd Zd Zy)8TestSpecial.test_dir_with_custom_dunders.<locals>.MyEnumc                 ,    t         j                  |       S r   r  r	  r   s    r;   r	  zATestSpecial.test_dir_with_custom_dunders.<locals>.MyEnum.__repr__      t,,r=   c                 ,    t         j                  |       S r   rw  r   s    r;   r  z@TestSpecial.test_dir_with_custom_dunders.<locals>.MyEnum.__str__	  rx  r=   c                 ,    t         j                  |       S r   rw  r   s    r;   r  zCTestSpecial.test_dir_with_custom_dunders.<locals>.MyEnum.__format__  rx  r=   c                      y r   rK   r   s    r;   r   zATestSpecial.test_dir_with_custom_dunders.<locals>.MyEnum.__init__  rS  r=   N)rE   rF   rG   r	  r  r  r   rK   r=   r;   r   ru    s    ---r=   r   )r   r  r  r  )r   rs  cls_dirr   s       r;   test_dir_with_custom_dundersz(TestSpecial.test_dir_with_custom_dunders  s    	 	i.W-G,w/W-	T 	 f+j'*i)lG,j'*r=   c                 Z   | j                  t              5   G d dt              }d d d        | j                  t              5   G d dt              }d d d        | j                  t              5   G d dt              }d d d        y # 1 sw Y   dxY w# 1 sw Y   CxY w# 1 sw Y   y xY w)Nc                       e Zd ZdZdZdZdZy)4TestSpecial.test_duplicate_name_error.<locals>.ColorrB   r'   rC   rS   NrE   rF   rG   redgreenbluerK   r=   r;   Colorr    s    r=   r  c                       e Zd ZdZdZdZd Zy)r  rB   r'   rC   c                      y)Nr  rK   r   s    r;   r  z8TestSpecial.test_duplicate_name_error.<locals>.Color.red"  s     r=   Nr  rK   r=   r;   r  z4TestSpecial.test_duplicate_name_error.<locals>.Color  s    !r=   c                   <    e Zd Zej                  d        ZdZdZdZy)r  c                      y)NredderrK   r   s    r;   r  z8TestSpecial.test_duplicate_name_error.<locals>.Color.red'  s    #r=   rB   r'   rC   N)rE   rF   rG   r.   r  r  r  r  rK   r=   r;   r  z4TestSpecial.test_duplicate_name_error.<locals>.Color&  s'    $ $r=   rp  r  r   r   r  s     r;   test_duplicate_name_errorz%TestSpecial.test_duplicate_name_error  s    y)  * y)! ! * y)  *) *) *) *)s#   B	B0B!	BB!B*c                 x    t        t        t              rt        | j                  t        j                  d       y )Nrj   )r  ri   	Exceptionr   rG   r   s    r;    test_enum_function_with_qualnamez,TestSpecial.test_enum_function_with_qualname.  s(    fi(L,,.CDr=   c                     G d dt               }| j                  |j                  j                  t               | j                  |j
                  j                  t               | j                  |j                  j                  t                G d d       G d d       G fddt               }| j                  |j                  j                         | j                  |j                  j                          G d	 d
       G fddt               }| j                  |j                  j                         y)2Support using Enum to refer to types deliberately.c                       e Zd ZeZeZeZy)/TestSpecial.test_enum_of_types.<locals>.MyTypesN)	rE   rF   rG   r  ir  frY  r   rK   r=   r;   MyTypesr  5  s    AAAr=   r  c                       e Zd Zy)+TestSpecial.test_enum_of_types.<locals>.FooNr   rK   r=   r;   Foor  <  r   r=   r  c                       e Zd Zy)+TestSpecial.test_enum_of_types.<locals>.BarNr   rK   r=   r;   Barr  >  r   r=   r  c                       e Zd ZW ZW  Zy)0TestSpecial.test_enum_of_types.<locals>.MyTypes2N)rE   rF   rG   r   br  r  s   r;   MyTypes2r  @  s    AAr=   r  c                       e Zd Zy)8TestSpecial.test_enum_of_types.<locals>.SpamEnumNotInnerNr   rK   r=   r;   SpamEnumNotInnerr  E  r   r=   r  c                       e Zd ZW  Zy)0TestSpecial.test_enum_of_types.<locals>.SpamEnumN)rE   rF   rG   rj  )r  s   r;   SpamEnumr  G  s    #Dr=   r  N)r   r   r  r`  r  r  r  r   rY  r   r  rj  )r   r  r  r  r  r  r  s       @@@r;   test_enum_of_typeszTestSpecial.test_enum_of_types3  s    	d 	 	#.%0#.	 		 		t 	 	))3/))3/	 		$t 	$,,.>?r=   c                     G d dt               }| j                  |j                  j                  t        j
                  t                  | j                  |j                  j                  t        t                  | j                  t        |j                        d       | j                  t        |j                        d       y )Nc                   4    e Zd Zej                  e   Zee   Zy)3TestSpecial.test_enum_of_generic_aliases.<locals>.EN)	rE   rF   rG   typingListr  r   r   r  rK   r=   r;   rM  r  L  s    C AS	Ar=   rM  z<E.a: typing.List[int]>z<E.b: list[int]>)
r   r   r   r`  r  r  r  r  r   r  )r   rM  s     r;   test_enum_of_generic_aliasesz(TestSpecial.test_enum_of_generic_aliasesK  s    	 	 	FKK$45DI.acc$=>acc$67r=   rC      zinner classes are not membersc                    | j                  t        d      5   G d dt              }ddd       | j                  t	        j
                  |             | j                  |j                  j                  d       | j                  |j
                  j                  j                  j                  d       | j                  t        |j
                  j                        |j
                  j                  j                  |j
                  j                  j                  g       | j                  t        |      |j                  |j                  |j
                  g       y# 1 sw Y   9xY w)z-
        Check for warnings pre-3.13
        zwill not become a memberc                   *    e Zd ZdZdZ G d de      Zy)BTestSpecial.test_nested_classes_in_enum_are_members.<locals>.OuterrB   r'   c                       e Zd ZdZdZy)HTestSpecial.test_nested_classes_in_enum_are_members.<locals>.Outer.Inner
   r  NrE   rF   rG   r   barrK   r=   r;   Innerr  `  s    CCr=   r  NrE   rF   rG   r   r  r   r  rK   r=   r;   Outerr  ]  s    D r=   r  NrB   r  )assertWarnsRegexDeprecationWarningr   r   r  r  r   r   r`  r   r   r  r  r   r  s     r;   'test_nested_classes_in_enum_are_membersz3TestSpecial.test_nested_classes_in_enum_are_membersT  s     ""#57QR  S 	
5;;67***..44b9""#[[""EKK$5$5$9$9:	 	KWWeggu{{+	 SRs   EE(zinner classes are still membersc                      G d dt               }| j                  t        |j                  t                     | j                  |j                  j                  d       | j                  |j                  j                  j                  d       | j                  t        |j                        |j                  j                  |j                  j                  g       | j                  t        |      |j                  |j                  g       y)'Support locally-defined nested classes.c                   *    e Zd ZdZdZ G d de      Zy)FTestSpecial.test_nested_classes_in_enum_are_not_members.<locals>.OuterrB   r'   c                       e Zd ZdZdZy)LTestSpecial.test_nested_classes_in_enum_are_not_members.<locals>.Outer.Innerr  r  Nr  rK   r=   r;   r  r  x  s    r=   r  Nr  rK   r=   r;   r  r  u  s    AA r=   r  rB   r  Nr   r   r  r  r  r   r   r`  r   r   r  r  r  s     r;   +test_nested_classes_in_enum_are_not_membersz7TestSpecial.test_nested_classes_in_enum_are_not_memberso  s    	D 	 	
5;;56*..3[[__ekkoo.	 	KWWegg	r=   c                      G d dt               }| j                  t        |j                  t                     | j                  |j                  j                  d       | j                  |j                  j                  j                  d       | j                  t        |j                        |j                  j                  |j                  j                  g       | j                  t        |      |j                  |j                  g       y )Nc                   4    e Zd ZdZdZe G d de             Zy)ETestSpecial.test_nested_classes_in_enum_with_nonmember.<locals>.OuterrB   r'   c                       e Zd ZdZdZy)KTestSpecial.test_nested_classes_in_enum_with_nonmember.<locals>.Outer.Innerr  r  Nr  rK   r=   r;   r  r        r=   r  N)rE   rF   rG   r   r  r   r   r  rK   r=   r;   r  r    s%    AA  r=   r  rB   r  r  r  s     r;   *test_nested_classes_in_enum_with_nonmemberz6TestSpecial.test_nested_classes_in_enum_with_nonmember  s    	D 	 	
5;;56*..3[[__ekkoo.	 	KWWegg	r=   c                 T    G d dt               }| j                  |j                  j                  t               | j                  |j                  t        u        | j                  |j                  j                  t                G d d       G d d       G fddt               }| j                  |j                  j                         | j                  |j                  u         G d	 d
       G fddt               }| j                  |j                  u        y)r  c                   $    e Zd ZeZ ee      ZeZ	y)>TestSpecial.test_enum_of_types_with_nonmember.<locals>.MyTypesN)
rE   rF   rG   r  r  r   r  r  rY  r   rK   r=   r;   r  r    s    A% AAr=   r  c                       e Zd Zy):TestSpecial.test_enum_of_types_with_nonmember.<locals>.FooNr   rK   r=   r;   r  r    r   r=   r  c                       e Zd Zy):TestSpecial.test_enum_of_types_with_nonmember.<locals>.BarNr   rK   r=   r;   r  r    r   r=   r  c                   &    e Zd ZW Z eW        Zy)?TestSpecial.test_enum_of_types_with_nonmember.<locals>.MyTypes2N)rE   rF   rG   r   r   r  r  s   r;   r  r    s    A#Ar=   r  c                       e Zd Zy)FTestSpecial.test_enum_of_types_with_nonmember.<locals>.SpamEnumIsInnerNr   rK   r=   r;   SpamEnumIsInnerr    r   r=   r  c                        e Zd Z eW        Zy)?TestSpecial.test_enum_of_types_with_nonmember.<locals>.SpamEnumN)rE   rF   rG   r   rj  )r  s   r;   r  r    s    _-Dr=   r  N)r   r   r  r`  r  r   r  r  r   rY  r   r  rj  )r   r  r  r  r  r  r  s       @@@r;   !test_enum_of_types_with_nonmemberz-TestSpecial.test_enum_of_types_with_nonmember  s    	d 	 	#.		U*+#.	 		 		t 	 	))3/

c)*	 		.t 	.89r=   c                     G d dt               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  d       | j                  t        |j
                        t                G d dt               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  d       | j                  t        |j
                        t               y )Nc                   *    e Zd ZdZdZ eeez        Zy)<TestSpecial.test_using_members_as_nonmember.<locals>.ExamplerB   r'   N)rE   rF   rG   rL  r  r   ALLrK   r=   r;   Exampler    s    AAAE"Cr=   r  rB   r'   rC   c                   >    e Zd Z e       Z e       Z eeez        Zy)r  N)rE   rF   rG   r   rL  r  r   r  rK   r=   r;   r  z<TestSpecial.test_using_members_as_nonmember.<locals>.Example  s    AAAE"Cr=   )	r   r   rL  r`  r  r  r  r  r  )r   r  s     r;   test_using_members_as_nonmemberz+TestSpecial.test_using_members_as_nonmember  s    	#d 	#
 	!,!,a(d7;;'-	#d 	#
 	!,!,a(d7;;'-r=   c                 ~    G d dt               }| j                  t        |j                  |             | j	                  |j
                  j                  d       | j	                  |j                  j                  j                  j                  d       | j	                  t        |j                  j                        |j                  j                  j                  |j                  j                  j                  g       | j	                  t        |      |j
                  |j                  |j                  g       y)r  c                   4    e Zd ZdZdZe G d de             Zy)BTestSpecial.test_nested_classes_in_enum_with_member.<locals>.OuterrB   r'   c                       e Zd ZdZdZy)HTestSpecial.test_nested_classes_in_enum_with_member.<locals>.Outer.Innerr  r  Nr  rK   r=   r;   r  r    r  r=   r  N)rE   rF   rG   r   r  r   r   r  rK   r=   r;   r  r    s%    AA  r=   r  rB   r  N)r   r   r  r  r   r   r`  r   r   r  r  r  s     r;   'test_nested_classes_in_enum_with_memberz3TestSpecial.test_nested_classes_in_enum_with_member  s    	D 	 	
5;;67***..44b9""#[[""EKK$5$5$9$9:	 	KWWeggu{{+	r=   c                 f    G d dt               }| j                  t        |      |j                  |j                  g       | j                  t        |j                        |       | j                  |j                  j                  d       | j                  |j                  j                  d       y )Nc                       e Zd ZdZdZy)2TestSpecial.test_enum_with_value_name.<locals>.HuhrB   r'   N)rE   rF   rG   r   r`  rK   r=   r;   Huhr    rg  r=   r  r   rB   )r   r   r   r   r`  r  r  )r   r  s     r;   test_enum_with_value_namez%TestSpecial.test_enum_with_value_name  sw    	$ 	 	cSXXsyy$9:d388nc*/+r=   c                 \    G d dt               } G d dt               } G d dt               } G d dt               }| j                  |j                  |       | j                  |j                  |       | j                  |j                  |       | j                  |j                  |       y )	Nc                       e Zd ZdZy)BTestSpecial.test_contains_name_and_value_overlap.<locals>.IntEnum1rB   NrE   rF   rG   r  rK   r=   r;   IntEnum1r    rN  r=   r  c                       e Zd ZdZy)BTestSpecial.test_contains_name_and_value_overlap.<locals>.IntEnum2rB   Nr  rK   r=   r;   IntEnum2r    rN  r=   r  c                       e Zd ZdZy)BTestSpecial.test_contains_name_and_value_overlap.<locals>.IntEnum3r'   Nr  rK   r=   r;   IntEnum3r    rN  r=   r  c                       e Zd ZdZy)BTestSpecial.test_contains_name_and_value_overlap.<locals>.IntEnum4rB   N)rE   rF   rG   r  rK   r=   r;   IntEnum4r    rN  r=   r  )r   r  r  r  )r   r  r  r  r  s        r;   $test_contains_name_and_value_overlapz0TestSpecial.test_contains_name_and_value_overlap  s|    	w 		w 		w 		w 	hjj(+hjj(+X.hjj(+r=   c                      G d dt               } G d dt              }| j                  |j                  |       | j                  |j                  |       y )Nc                       e Zd ZdZy)HTestSpecial.test_contains_different_types_same_members.<locals>.IntEnum1rB   Nr  rK   r=   r;   r  r    rN  r=   r  c                       e Zd ZdZy)HTestSpecial.test_contains_different_types_same_members.<locals>.IntFlag1rB   Nr  rK   r=   r;   IntFlag1r    rN  r=   r  )r   r   r  r  )r   r  r  s      r;   *test_contains_different_types_same_membersz6TestSpecial.test_contains_different_types_same_members  s>    	w 		w 	hjj(+hjj(+r=   c                     G d dt               } G d d|t        j                        }| j                  t	        |j
                        d       |t               d<   |t               d<   t        | j                  |j
                         t        | j                  |        G d d|      } G d d	|t        j                        }| j                  |j                  |       |t               d<   |t               d	<   t        | j                  |j                         t        | j                  |        G d
 dt               } G d d|t              }| j                  |j                  |       | j                   |d      |j                         |t               d<   |t               d<   t        | j                  |j                         t        | j                  |       y )Nc                       e Zd ZdZd Zy)4TestSpecial.test_inherited_data_type.<locals>.HexIntHexIntc                     t        |       S r   hexr   s    r;   r	  z=TestSpecial.test_inherited_data_type.<locals>.HexInt.__repr__      4y r=   Nr=  rK   r=   r;   r
  r	    s    #L!r=   r
  c                       e Zd ZdZdZdZdZy)4TestSpecial.test_inherited_data_type.<locals>.MyEnumr   rB   r'   rC   NrE   rF   rG   rL  r  r?  rK   r=   r;   r   r    s    #LAAAr=   r   z<MyEnum.A: 0x1>c                       e Zd ZdZy)6TestSpecial.test_inherited_data_type.<locals>.SillyIntSillyIntNr   rK   r=   r;   r  r    s    %Lr=   r  c                       e Zd ZdZdZdZdZy)9TestSpecial.test_inherited_data_type.<locals>.MyOtherEnumMyOtherEnumrS   rE     N)rE   rF   rG   r@  rM  rA  rK   r=   r;   r  r    s    (LAAAr=   r  c                       e Zd ZdZd Zy)9TestSpecial.test_inherited_data_type.<locals>.UnBrokenIntUnBrokenIntc                 .    t         j                  | |      S r   )r  r{  )ri  r`  s     r;   r{  zATestSpecial.test_inherited_data_type.<locals>.UnBrokenInt.__new__  s    {{3..r=   Nr  rK   r=   r;   r  r    s    (L/r=   r  c                       e Zd ZdZdZdZdZy)<TestSpecial.test_inherited_data_type.<locals>.MyUnBrokenEnumMyUnBrokenEnumr      r  N)rE   rF   rG   GHIrK   r=   r;   r  r    s    +LAAAr=   r  r   )r  r.   r   r   r  rL  globalsrx   r  rX  rM  r!  r#  )r   r
  r   r  r  r  r  s          r;   test_inherited_data_typez$TestSpecial.test_inherited_data_type  sc   	!S 	!	VTYY 	
 	fhh):;$	($	(dmmVXX6dmmV4	&v 	&	(DII 	
 	k//: (	*#.	- dmm[]];dmm[9	/# 	/	[$ 	
 	n22K@nQ')9)9:#.	- &4	"#dmm^-=-=>dmm^<r=   c                    t         j                  t        j                  j                        }| j                  t        j                  |      t        j                         t         j                  t        j                  j                  dz         }| j                  t              5  t        j                  |       d d d        y # 1 sw Y   y xY w)Ng{Gz?)	r  r  rP   rJ   r`  r  fromhexrp  r   )r   hs     r;   test_floatenum_fromhexz"TestSpecial.test_floatenum_fromhex*  s    IIl&&,,-l**1-|/?/?@IIl&&,,t34z*  # +**s   &CCc                 .   t        ddt              }t        |      }| j                  t	        |      t	        |             | j                  t	        |      d|       | j                  |j
                  |j                  |j                  g|       t        dj                         d      D ]h  \  }} ||      }| j                  ||       | j                  |j                  |       | j                  ||       | j                  t        |      |       j y )Nr  r  r  rC   rB   r   r  r   r   r  r  r  r  	enumerater  r   r  r  r  r   r  r"  r  r#  r%  s         r;   test_programmatic_function_typez+TestSpecial.test_programmatic_function_type1  s    &8sC	9oS3y>2YI61A1AB	 ""4":":"<a@HAu!AQ"QVVU+MM!Y'MM$q'9- Ar=   c                 p   t        ddd      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  |j                  |j
                  |j                  g|       t        dj                         d      D ]  \  }} ||      }| j                  t        |j                        |       | j                  ||       | j                  |j                  |       | j                  ||       | j                  t        |      |        y )Nr  r  r  r6  rC   r   r   r   r  r  r  r  r,  r  r  r`  r   r   r  r  r  r-  s         r;   ,test_programmatic_function_string_with_startz8TestSpecial.test_programmatic_function_string_with_startA  s    &8C	9oS3y>2YI61A1AB	 ""4":":"<bAHAu!AS\1-1%QVVU+MM!Y'MM$q'9- Br=   c                 0   t        ddt        d      }t        |      }| j                  t	        |      t	        |             | j                  t	        |      d|       | j                  |j
                  |j                  |j                  g|       t        dj                         d      D ]h  \  }} ||      }| j                  ||       | j                  |j                  |       | j                  ||       | j                  t        |      |       j y )Nr  r  r  )r  r6  rC   r+  r-  s         r;   *test_programmatic_function_type_with_startz6TestSpecial.test_programmatic_function_type_with_startR  s    &8s"M	9oS3y>2YI61A1AB	 ""4":":"<bAHAu!AQ"QVVU+MM!Y'MM$q'9- Br=   c                 t   t        dg dd      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  |j                  |j
                  |j                  g|       t        dj                         d      D ]  \  }} ||      }| j                  t        |j                        |       | j                  ||       | j                  |j                  |       | j                  ||       | j                  t        |      |        y )Nr  r     r0  rC   r  r1  r-  s         r;   1test_programmatic_function_string_list_with_startz=TestSpecial.test_programmatic_function_string_list_with_startb  s    &@K	9oS3y>2YI61A1AB	 ""4":":"<bAHAu!AS\1-1%QVVU+MM!Y'MM$q'9- Br=   c                 "   t        dd      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  |j                  |j
                  |j                  g|       t        dj                         d      D ]h  \  }} ||      }| j                  ||       | j                  |j                  |       | j                  ||       | j                  t        |      |       j y )Nr  r  rC   rB   r   r   r   r  r  r  r  r,  r  r   r  r  r  r-  s         r;   -test_programmatic_function_type_from_subclassz9TestSpecial.test_programmatic_function_type_from_subclasss  s    K);<	9oS3y>2YI61A1AB	 ""4":":"<a@HAu!AQ"QVVU+MM!Y'MM$q'9- Ar=   c                 &   t        ddd      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  |j                  |j
                  |j                  g|       t        dj                         d      D ]h  \  }} ||      }| j                  ||       | j                  |j                  |       | j                  ||       | j                  t        |      |       j y )Nr  r  (   r0  rC   r9  r-  s         r;   8test_programmatic_function_type_from_subclass_with_startzDTestSpecial.test_programmatic_function_type_from_subclass_with_start  s    K);2F	9oS3y>2YI61A1AB	 ""4":":"<bAHAu!AQ"QVVU+MM!Y'MM$q'9- Br=   c                     G d dt               }| j                  t        d|d       | j                   |d      |j                         | j                   |dd      |j                          G d dt               }| j                   |d	      |j
                         | j                   |d
dd      |j
                         y )Nc                       e Zd ZdZdZdZy)ETestSpecial.test_programmatic_function_is_value_call.<locals>.TwoPartrB         ?)r'          @)rC         @NrE   rF   rG   r   r   THREErK   r=   r;   TwoPartr@    s    CCEr=   rG  z1 is not a valid .*TwoPartrB   rA  rB  c                       e Zd ZdZdZdZy)GTestSpecial.test_programmatic_function_is_value_call.<locals>.ThreePart)rB   rB  r  )r'   rC  r  rC   rD  threeNrE  rK   r=   r;   	ThreePartrI    s    CC#Er=   rL  rJ  rC   rD  rK  )r   r   r   r  r   rF  )r   rG  rL  s      r;   (test_programmatic_function_is_value_callz4TestSpecial.test_programmatic_function_is_value_call  s    	d 	 	z+GRSTgh'5gaow{{3	$ 	$ 	i 12IOODi30)//Br=   c                     | j                  t        j                  dd      t        j                         | j	                  t
              5  t        j                  dd       d d d        y # 1 sw Y   y xY w)Ns    bigs    )r  rN   
from_bytesrJ   rp  r   r   s    r;   test_intenum_from_bytesz#TestSpecial.test_intenum_from_bytes  sK    j++K?Pz*!!+u5 +**s   
A**A3c                 x    | j                  t        d      5   G d dt              }d d d        y # 1 sw Y   y xY w)Nz-_sunder_ names, such as ._bad_., are reservedc                       e Zd ZdZy)3TestSpecial.test_reserved_sunder_error.<locals>.BadrB   N)rE   rF   rG   r   rK   r=   r;   BadrT    s    r=   rU  )r   r   r   )r   rU  s     r;   test_reserved_sunder_errorz&TestSpecial.test_reserved_sunder_error  s2    ##?d 	     09c                 @   | j                  t        d      5   G d dt        t        t              }d d d         G d dt              } G d dt              }| j                  t        d      5   G d d||t              }d d d        y # 1 sw Y   XxY w# 1 sw Y   y xY w)	Nztoo many data typesc                       e Zd ZdZy1TestSpecial.test_too_many_data_types.<locals>.HuhrB   NrE   rF   rG   OnerK   r=   r;   r  r[    r  r=   r  c                       e Zd Zd Zy)3TestSpecial.test_too_many_data_types.<locals>.MyStrc                     d| z  S )Nz	hello, %srK   r   s    r;   helloz9TestSpecial.test_too_many_data_types.<locals>.MyStr.hello  s    "T))r=   NrE   rF   rG   ra  rK   r=   r;   MyStrr_    s    *r=   rc  c                       e Zd Zd Zy)3TestSpecial.test_too_many_data_types.<locals>.MyIntc                     t        |       S r   r  r   s    r;   r  z8TestSpecial.test_too_many_data_types.<locals>.MyInt.repr  r  r=   N)rE   rF   rG   r  rK   r=   r;   MyIntre        !r=   rg  c                       e Zd ZdZyrZ  r\  rK   r=   r;   r  z1TestSpecial.test_too_many_data_types.<locals>.Huh  r  r=   )r   r  rY  r  r   )r   r  rc  rg  s       r;   test_too_many_data_typesz$TestSpecial.test_too_many_data_types  s    ##I/DEc3  F	*C 	*	!C 	! ##I/DEeUD  FE FE FEs   B-BBBc                     t        t        t              rt        t        | j                  t        j
                         t        | j                  t               y r   )r  rA   r  rx   r  rI   r   s    r;   test_pickle_enumzTestSpecial.test_pickle_enum  s1    gy)MdmmW]];dmmW5r=   c                     t        t        t              rt        t        | j                  t        j
                         t        | j                  t               y r   )r  rN   r  rx   r  rI   r   s    r;   test_pickle_intzTestSpecial.test_pickle_int  s4    j),dmmZ-=-=>dmmZ8r=   c                     t        t        t              rt        t        | j                  t        j
                         t        | j                  t               y r   )r  rP   r  rx   r  rI   r   s    r;   test_pickle_floatzTestSpecial.test_pickle_float  s4    lI.dmm\-?-?@dmm\:r=   c                     t        t        t              rt        t        | j                  t        j
                         t        | j                  t               y r   )r  rh   r  rx   r  himr   s    r;   test_pickle_enum_functionz%TestSpecial.test_pickle_enum_function  s1    fi(LdmmVZZ8dmmV4r=   c                     t        t        t              rt        t        | j                  t        j
                         t        | j                  t               y r   )r  re   r  rx   r  whor   s    r;   %test_pickle_enum_function_with_modulez1TestSpecial.test_pickle_enum_function_with_module  s1    h	*NdmmX\\:dmmX6r=   c                      G d dt               }|| j                  _        d| j                  j                  z  | j                  _        t        | j                  | j                  j                         y )Nc                       e Zd ZdZdZy)8TestSpecial.test_pickle_nested_class.<locals>.NestedEnumcommonrareN)rE   rF   rG   twigsshinyrK   r=   r;   
NestedEnumry    s    EEr=   r~  z%s.NestedEnum)r   rU  r~  rE   rG   rx   r  r|  )r   r~  s     r;   test_pickle_nested_classz$TestSpecial.test_pickle_nested_class  sO    	 	 %/!'69P9P'P$dmmT__-B-BCr=   c                      G d dt               }t        j                  |_        t	        t
              D ]-  }| j                  |j                  j                  |      d       / y )Nc                       e Zd ZdZdZy)9TestSpecial.test_pickle_by_name.<locals>.ReplaceGlobalIntrB   r'   Nr   rK   r=   r;   ReplaceGlobalIntr        CCr=   r  r   )r   r.   _reduce_ex_by_global_name__reduce_ex__rt   r!   r   r   )r   r  protos      r;   test_pickle_by_namezTestSpecial.test_pickle_by_name  sQ    	w 	 *.)G)G&+,E-11??FN -r=   c                     t        ddt              }|t               d<   t        j                  |       t        | j                  t        |j                         t        | j                  t        |       y )N	BadPicklezdill sweet bread-n-butterrf   )
r   rE   r$  r.   _make_class_unpicklabler|   rp  r  dillr    )r   r  s     r;   test_pickle_explodesz TestSpecial.test_pickle_explodes  sW    8K	!*	+$$Y/d//INNKd//	Jr=   c                 d     G d dt         t              }| j                  |j                  d       y )Nc                       e Zd ZdZdZdZy)0TestSpecial.test_string_enum.<locals>.SkillLevelz'what is the sound of one hand clapping?z#why did the chicken cross the road?knock, knock!N)rE   rF   rG   master
journeyman
apprenticerK   r=   r;   
SkillLevelr    s    >F>J(Jr=   r  r  )rY  r   r   r  )r   r  s     r;   test_string_enumzTestSpecial.test_string_enum  s(    	)d 	) 	..@r=   c                      G d dt               }| j                   |d      |j                         | j                  t        |d      |j                         | j                  |d   |j
                         y )Nc                       e Zd ZdZdZdZdZy)0TestSpecial.test_getattr_getitem.<locals>.PeriodrB   r'   rC   rS   N)rE   rF   rG   morningnooneveningnightrK   r=   r;   Periodr    s    GDGEr=   r  r'   r  r  )r   r  r  r[  r  r  r   r  s     r;   test_getattr_getitemz TestSpecial.test_getattr_getitem  sV    	T 	
 	fQi-gfg.=fY'8r=   c                 R    | j                   }| j                  t        |d             y )N__eq__)rn  r   r[  rs  s     r;   test_getattr_dunderzTestSpecial.test_getattr_dunder  s    12r=   c                      G d dt               }| j                  t        |      |j                  |j                  |j
                  |j                  g       y )Nc                       e Zd ZdZdZdZdZy)0TestSpecial.test_iteration_order.<locals>.Seasonr'   rS   rC   rB   N)rE   rF   rG   rl  r:  rm  rk  rK   r=   r;   rn  r    r;  r=   rn  )r   r   r   rl  r:  rm  rk  rs  s     r;   test_iteration_orderz TestSpecial.test_iteration_order  sA    	T 	
 	Vv}}fmmL	r=   c                 n   t        t        t              rt        | j                  t        j                  d       | j                  t        j                  t        d             | j                  t        j                  t        t        d             t        | j                  t        j                         y )Nrb   rc   )	r  ra   r  r   rc   r   r  r[  rx   r   s    r;   test_subclassingzTestSpecial.test_subclassing  si    dI&J$67		4(:#;<diiv!67dmmTYY7r=   c                 j    G d dt               }| j                  t              5   G d d|      }d d d        | j                  t        d      5   G d d|t              }d d d        | j                  t
        d      5   |d	d
       d d d        y # 1 sw Y   axY w# 1 sw Y   >xY w# 1 sw Y   y xY w)Nc                       e Zd ZdZdZdZy))TestSpecial.test_extending.<locals>.ColorrB   r'   rC   Nr  rK   r=   r;   r  r         CEDr=   r  c                       e Zd ZdZdZdZy)-TestSpecial.test_extending.<locals>.MoreColorrS   rE  r  NrE   rF   rG   cyanmagentayellowrK   r=   r;   	MoreColorr  &      r=   r  z3<enum .EvenMoreColor.> cannot extend <enum .Color.>c                       e Zd ZdZy)1TestSpecial.test_extending.<locals>.EvenMoreColorr   N)rE   rF   rG   
chartrueserK   r=   r;   EvenMoreColorr  ,  r  r=   r  z5\(.Foo., \(.pink., .black.\)\) is not a valid .*Colorr  )pinkblack)r   rp  r  r   r   r   )r   r  r  r  s       r;   test_extendingzTestSpecial.test_extending  s    	D 	
 y)E  * ##I/dew  f ##J0hi%*+ ji *) fe jis#   BB>
B)BB&)B2c                      G d dt               }| j                  t        |j                        |       | j	                  |j
                  j                         d       y )Nc                       e Zd ZdZdZd Zy)2TestSpecial.test_exclude_methods.<locals>.whateverr  thosec                      d| j                   z  S )Nz
no, not %sr`  r   s    r;   reallyz9TestSpecial.test_exclude_methods.<locals>.whatever.really6  s    #djj00r=   N)rE   rF   rG   r  r  r  rK   r=   r;   whateverr  3  s    DE1r=   r  zno, not that)r   assertIsNotr  r  r   r  )r   r  s     r;   test_exclude_methodsz TestSpecial.test_exclude_methods2  sF    	1t 	1
 	hoo.9--/@r=   c                     | j                  t              5   G d dt        t              }d d d        y # 1 sw Y   y xY w)Nc                       e Zd ZdZy)7TestSpecial.test_wrong_inheritance_order.<locals>.Wrongzerror before this pointN)rE   rF   rG   NotHererK   r=   r;   r  r  =  s    3r=   r  )rp  r  r   rY  r  s     r;   test_wrong_inheritance_orderz(TestSpecial.test_wrong_inheritance_order;  s*    y)4c 4 *))s   4=c                      G d dt               | j                        5   G fddt              }d d d        y # 1 sw Y   y xY w)Nc                        e Zd Z fdZ xZS )MTestSpecial.test_raise_custom_error_on_creation.<locals>.InvalidRgbColorErrorc           	      b    || _         || _        || _        t        |   d| d| d| d       y )N(z, z) is not a valid RGB color)rgr  rz  r   )r   r  r  r  rU  s       r;   r   zVTestSpecial.test_raise_custom_error_on_creation.<locals>.InvalidRgbColorError.__init__B  s;     1QCr!Bqc1K!LMr=   )rE   rF   rG   r   r}  r~  s   @r;   InvalidRgbColorErrorr  A  s    N Nr=   r  c                   (    e Zd ZdZdZdZdZ fdZy)ATestSpecial.test_raise_custom_error_on_creation.<locals>.RgbColor)r  r   r   )r   r  r   )r   r   r  )   r   r   c                 D    t        d |||fD              s
 |||      y )Nc              3   <   K   | ]  }d |cxk  xr dk  nc   yw)r   r  NrK   ).0r  s     r;   	<genexpr>z]TestSpecial.test_raise_custom_error_on_creation.<locals>.RgbColor.__init__.<locals>.<genexpr>P  s     D)3qC3)s   )all)r   r  r  r  r  s       r;   r   zJTestSpecial.test_raise_custom_error_on_creation.<locals>.RgbColor.__init__O  s,    D1a)DD21a;; Er=   N)rE   rF   rG   r  GREENBLUEINVALIDr   )r  s   r;   RgbColorr  I  s    !#"%<r=   r  )r   rp  r   )r   r  r  s     @r;   #test_raise_custom_error_on_creationz/TestSpecial.test_raise_custom_error_on_creation@  s:    	N: 	N 34<4 < 544r  c                 $    G d dt               } G d dt               }| j                  |j                  |j                         | j                  |j                  |j
                         | j                  |j                  |j                         y )Nc                       e Zd ZdZdZdZy)5TestSpecial.test_intenum_transitivity.<locals>.numberrB   r'   rC   NrE   rF   rG   r  r  rK  rK   r=   r;   numberr  T      CCEr=   r  c                       e Zd ZdZdZdZy)5TestSpecial.test_intenum_transitivity.<locals>.numerorB   r'   rC   N)rE   rF   rG   unodostresrK   r=   r;   numeror  X      CCDr=   r  )r   r   r  r  r  r  rK  r  )r   r  r  s      r;   test_intenum_transitivityz%TestSpecial.test_intenum_transitivityS  sd    	W 		W 	 	VZZ0VZZ0v{{3r=   c                      G d dt               } G d dt               }| j                  t        ||j                         y )Nc                       e Zd ZdZdZy)7TestSpecial.test_wrong_enum_in_call.<locals>.Monochromer   rB   NrE   rF   rG   r  whiterK   r=   r;   
Monochromer  a      EEr=   r  c                       e Zd ZdZdZy)3TestSpecial.test_wrong_enum_in_call.<locals>.Genderr   rB   NrE   rF   rG   malefemalerK   r=   r;   Genderr  d      DFr=   r  )r   rp  r   r  r   r  r  s      r;   test_wrong_enum_in_callz#TestSpecial.test_wrong_enum_in_call`  s2    	 		T 	 	*j&++>r=   c                      G d dt               } G d dt              }| j                  t        ||j                         y )Nc                       e Zd ZdZdZy)=TestSpecial.test_wrong_enum_in_mixed_call.<locals>.Monochromer   rB   Nr  rK   r=   r;   r  r  j  r  r=   r  c                       e Zd ZdZdZy)9TestSpecial.test_wrong_enum_in_mixed_call.<locals>.Genderr   rB   Nr  rK   r=   r;   r  r  m  r  r=   r  )r   r   rp  r   r  r  s      r;   test_wrong_enum_in_mixed_callz)TestSpecial.test_wrong_enum_in_mixed_calli  s2    	 		T 	 	*j&++>r=   c                      G d dt               } G d dt               }| j                   ||j                        |j                         y )Nc                       e Zd ZdZdZy)9TestSpecial.test_mixed_enum_in_call_1.<locals>.Monochromer   rB   Nr  rK   r=   r;   r  r  s  r  r=   r  c                       e Zd ZdZdZy)5TestSpecial.test_mixed_enum_in_call_1.<locals>.Genderr   rB   Nr  rK   r=   r;   r  r	  v  r  r=   r  )r   r  r  r  r  s      r;   test_mixed_enum_in_call_1z%TestSpecial.test_mixed_enum_in_call_1r  s9    	 		W 	 	j/1A1ABr=   c                      G d dt               } G d dt              }| j                   ||j                        |j                         y )Nc                       e Zd ZdZdZy)9TestSpecial.test_mixed_enum_in_call_2.<locals>.Monochromer   rB   Nr  rK   r=   r;   r  r  |  r  r=   r  c                       e Zd ZdZdZy)5TestSpecial.test_mixed_enum_in_call_2.<locals>.Genderr   rB   Nr  rK   r=   r;   r  r    r  r=   r  )r   r   r  r  r  r  s      r;   test_mixed_enum_in_call_2z%TestSpecial.test_mixed_enum_in_call_2{  s9    	 		W 	 	j-z/?/?@r=   c                      G d dt               } G d d|      }| j                  t        |j                        d       y )Nc                       e Zd Zd Zy)-TestSpecial.test_flufl_enum.<locals>.Fluflnumc                 ,    t        | j                        S r   )r  r`  r   s    r;   __int__z5TestSpecial.test_flufl_enum.<locals>.Fluflnum.__int__  s    4::&r=   N)rE   rF   rG   r  rK   r=   r;   Fluflnumr        'r=   r  c                       e Zd ZdZdZdZy)3TestSpecial.test_flufl_enum.<locals>.MailManOptionsrB   r'   rC   N)rE   rF   rG   option1option2option3rK   r=   r;   MailManOptionsr    s    GGGr=   r  rB   )r   r   r  r  )r   r  r  s      r;   test_flufl_enumzTestSpecial.test_flufl_enum  s7    	't 	'	X 	 	^334a8r=   c                 $    G d dt               }| j                  |j                  j                  t               | j                  |j                  t                G d dt
        t              }| j                  |j                  j                  t
               | j                  |j                  t
                G d dt              }| j                  |j                  j                  t               | j                  |j                  t               y )Nc                       e Zd ZdZdZy).TestSpecial.test_introspection.<locals>.Numberd      NrE   rF   rG   r  r  rK   r=   r;   r  r!    s    CCr=   r  c                       e Zd ZdZdZdZy).TestSpecial.test_introspection.<locals>.StringsoftroughhardN)rE   rF   rG   yarnropewirerK   r=   r;   Stringr&    s    DDDr=   r-  c                       e Zd ZdZdZy)-TestSpecial.test_introspection.<locals>.Plainr  rB   N)rE   rF   rG   vanillar  rK   r=   r;   Plainr/    s    GCr=   r1  )
r   r  r  rX  r  rY  r   r*  r0  r  )r   r  r-  r1  s       r;   test_introspectionzTestSpecial.test_introspection  s    	W 	 	fjj..4f**C0	S$ 	 	fkk//5f**C0	D 	 	emm116:e))62r=   c                      G d dt               }| j                  t              5   |d       d d d        | j                  t              5  |d    d d d        y # 1 sw Y   -xY w# 1 sw Y   y xY w)Nc                       e Zd ZdZdZdZy)3TestSpecial.test_no_such_enum_member.<locals>.ColorrB   r'   rC   Nr  rK   r=   r;   r  r5    r  r=   r  rS   
chartreuse)r   rp  r   KeyErrorr  s     r;   test_no_such_enum_memberz$TestSpecial.test_no_such_enum_member  sX    	D 	 z*!H +x(, )( +*((s   	AA&A#&A/c                      G fddt        t                     G d dt              } G d dt              } G d d	|      } G d
 d|      }y )Nc                   "     e Zd Z fdZ xZS )6TestSpecial.test_multiple_mixin_mro.<locals>.auto_enumc                 "    t        |             }||_        t        |j                        }d}|j                  D ]  }||   }|t        u r|}n|}|dz  }|||<     |j                         D ]  \  }}||vs|||<    t        
|   | |||      S Nr   rB   )r  	_cls_namer  _member_namesEllipsisitemsrz  r{  )metaclsri  bases	classdicttemprW  r  kvrU  	auto_enums            r;   r{  z>TestSpecial.test_multiple_mixin_mro.<locals>.auto_enum.__new__  s    &tI(!$I334"00A!!AH}FADG 1 &OO-DAq~"#Q . Y8eT3 3r=   rE   rF   rG   r{  r}  )rU  rH  s   @r;   rH  r;    s    3 3r=   rH  c                       e Zd Zy)=TestSpecial.test_multiple_mixin_mro.<locals>.AutoNumberedEnumNr   rK   r=   r;   AutoNumberedEnumrK    r   r=   rL  rH  c                       e Zd Zy)8TestSpecial.test_multiple_mixin_mro.<locals>.AutoIntEnumNr   rK   r=   r;   AutoIntEnumrN    r   r=   rO  c                       e Zd ZdZdZdZy);TestSpecial.test_multiple_mixin_mro.<locals>.TestAutoNumber.rC   NrE   rF   rG   r   r  crK   r=   r;   TestAutoNumberrQ        AAAr=   rT  c                       e Zd ZdZdZdZy)8TestSpecial.test_multiple_mixin_mro.<locals>.TestAutoInt.rC   NrR  rK   r=   r;   TestAutoIntrW    rU  r=   rX  )r  r   r   )r   rL  rO  rT  rX  rH  s        @r;   test_multiple_mixin_mroz#TestSpecial.test_multiple_mixin_mro  sH    	3T
 	3(	ty 		'Y 		- 	
	+ 	r=   c                 P    G fddt                G d dt              }| j                  |j                  t        j                         | j	                  t        |j                  |j                  z         d       t               d<   |t               d<    dd      }| j	                  |d       t        | j                  |d       | j	                  |j                  j                  d       t        | j                  |j                         t        | j                  |       y )	Nc                   X    e Zd ZdZd Zd Zej                  d        Z d Zd Z fdZ	y)	=TestSpecial.test_subclasses_with_getnewargs.<locals>.NamedIntNamedIntc                     |}|^}}t        |      dk(  rt        d      t        j                  | g| }||_        ||_        |S Nr    name and value must be specifiedr  r  r  r{  _intname_argsri  argsrc  r   r   s        r;   r{  zETestSpecial.test_subclasses_with_getnewargs.<locals>.NamedInt.__new__  M    "tt9>#$FGG{{3.. $"
r=   c                     | j                   S r   rc  r   s    r;   __getnewargs__zLTestSpecial.test_subclasses_with_getnewargs.<locals>.NamedInt.__getnewargs__  s    zz!r=   c                     | j                   S r   rb  r   s    r;   rE   zFTestSpecial.test_subclasses_with_getnewargs.<locals>.NamedInt.__name__      }}$r=   c                     dj                  t        |       j                  | j                  t        j	                  |             S Nz{}({!r}, {})r_  r  rE   r  r	  r   s    r;   r	  zFTestSpecial.test_subclasses_with_getnewargs.<locals>.NamedInt.__repr__  5    %,,T
++T* r=   c                 |    t         }|j                  }|j                  t        u r|j	                  |       S  ||       S r   r  r  __objclass__r  r	  r   basebase_strs      r;   r  zETestSpecial.test_subclasses_with_getnewargs.<locals>.NamedInt.__str__  7    <<((F2==..~%r=   c                     t        |       t        |      z   }t        |       r9t        |      r- dj                  | j                  |j                        |      S |S Nz({0} + {1})r  r  r_  rE   r   otherrE  r]  s      r;   __add__zETestSpecial.test_subclasses_with_getnewargs.<locals>.NamedInt.__add__  W    4y3;.dH-*UH2M#%,,T]]ENNK 
  Kr=   N)
rE   rF   rG   r{  ri  bltnsr  r	  r  r}  r]  s   r;   r]  r\    s7    %L"^^% %& r=   r]  c                       e Zd ZdZdZdZy)8TestSpecial.test_subclasses_with_getnewargs.<locals>.NEINEIzthe-xrB   zthe-yr'   NrE   rF   rG   xyrK   r=   r;   r  r         LAAr=   r  NamedInt('(the-x + the-y)', 3)testrE  r'   r  r   r  r{  r   r  r  r  r$  rx   r`  r   r  NI5r]  s      @r;   test_subclasses_with_getnewargsz+TestSpecial.test_subclasses_with_getnewargs      (	 s (	 T	(D 	 	ckk4<<0ceeceem,.NO (	*	%vq!a d..Q7a(dmmSUU3dmmS1r=   c                 P    G fddt                G d dt              }| j                  |j                  t        j                         | j	                  t        |j                  |j                  z         d       t               d<   |t               d<    dd      }| j	                  |d       t        | j                  |d       | j	                  |j                  j                  d       t        | j                  |j                         t        | j                  |       y )	Nc                   X    e Zd ZdZd Zd Zej                  d        Z d Zd Z fdZ	y)	@TestSpecial.test_subclasses_with_getnewargs_ex.<locals>.NamedIntr]  c                     |}|^}}t        |      dk(  rt        d      t        j                  | g| }||_        ||_        |S r_  ra  rd  s        r;   r{  zHTestSpecial.test_subclasses_with_getnewargs_ex.<locals>.NamedInt.__new__  rf  r=   c                     | j                   i fS r   rh  r   s    r;   __getnewargs_ex__zRTestSpecial.test_subclasses_with_getnewargs_ex.<locals>.NamedInt.__getnewargs_ex__  s    zz2~%r=   c                     | j                   S r   rk  r   s    r;   rE   zITestSpecial.test_subclasses_with_getnewargs_ex.<locals>.NamedInt.__name__  rl  r=   c                     dj                  t        |       j                  | j                  t        j	                  |             S rn  ro  r   s    r;   r	  zITestSpecial.test_subclasses_with_getnewargs_ex.<locals>.NamedInt.__repr__  rp  r=   c                 |    t         }|j                  }|j                  t        u r|j	                  |       S  ||       S r   rr  rt  s      r;   r  zHTestSpecial.test_subclasses_with_getnewargs_ex.<locals>.NamedInt.__str__%  rw  r=   c                     t        |       t        |      z   }t        |       r9t        |      r- dj                  | j                  |j                        |      S |S ry  rz  r{  s      r;   r}  zHTestSpecial.test_subclasses_with_getnewargs_ex.<locals>.NamedInt.__add__.  r~  r=   N)
rE   rF   rG   r{  r  r  r  r	  r  r}  r  s   r;   r]  r    s7    %L&^^% %& r=   r]  c                       e Zd ZdZdZdZy);TestSpecial.test_subclasses_with_getnewargs_ex.<locals>.NEIr  r  r  Nr  rK   r=   r;   r  r  8  r  r=   r  r  r  rE  r'   r  r  s      @r;   "test_subclasses_with_getnewargs_exz.TestSpecial.test_subclasses_with_getnewargs_ex  r  r=   c                 P    G fddt                G d dt              }| j                  |j                  t        j                         | j	                  t        |j                  |j                  z         d       t               d<   |t               d<    dd      }| j	                  |d       t        | j                  |d       | j	                  |j                  j                  d       t        | j                  |j                         t        | j                  |       y )	Nc                   X    e Zd ZdZd Zd Zej                  d        Z d Zd Z fdZ	y)	9TestSpecial.test_subclasses_with_reduce.<locals>.NamedIntr]  c                     |}|^}}t        |      dk(  rt        d      t        j                  | g| }||_        ||_        |S r_  ra  rd  s        r;   r{  zATestSpecial.test_subclasses_with_reduce.<locals>.NamedInt.__new__L  rf  r=   c                 2    | j                   | j                  fS r   rU  rc  r   s    r;   
__reduce__zDTestSpecial.test_subclasses_with_reduce.<locals>.NamedInt.__reduce__U      ~~tzz11r=   c                     | j                   S r   rk  r   s    r;   rE   zBTestSpecial.test_subclasses_with_reduce.<locals>.NamedInt.__name__W  rl  r=   c                     dj                  t        |       j                  | j                  t        j	                  |             S rn  ro  r   s    r;   r	  zBTestSpecial.test_subclasses_with_reduce.<locals>.NamedInt.__repr__Z  rp  r=   c                 |    t         }|j                  }|j                  t        u r|j	                  |       S  ||       S r   rr  rt  s      r;   r  zATestSpecial.test_subclasses_with_reduce.<locals>.NamedInt.__str__a  rw  r=   c                     t        |       t        |      z   }t        |       r9t        |      r- dj                  | j                  |j                        |      S |S ry  rz  r{  s      r;   r}  zATestSpecial.test_subclasses_with_reduce.<locals>.NamedInt.__add__j  r~  r=   N)
rE   rF   rG   r{  r  r  r  r	  r  r}  r  s   r;   r]  r  J  7    %L2^^% %& r=   r]  c                       e Zd ZdZdZdZy)4TestSpecial.test_subclasses_with_reduce.<locals>.NEIr  r  r  Nr  rK   r=   r;   r  r  t  r  r=   r  r  r  rE  r'   r  r  s      @r;   test_subclasses_with_reducez'TestSpecial.test_subclasses_with_reduceI  r  r=   c                 P    G fddt                G d dt              }| j                  |j                  t        j                         | j	                  t        |j                  |j                  z         d       t               d<   |t               d<    dd      }| j	                  |d       t        | j                  |d       | j	                  |j                  j                  d       t        | j                  |j                         t        | j                  |       y )	Nc                   X    e Zd ZdZd Zd Zej                  d        Z d Zd Z fdZ	y)	<TestSpecial.test_subclasses_with_reduce_ex.<locals>.NamedIntr]  c                     |}|^}}t        |      dk(  rt        d      t        j                  | g| }||_        ||_        |S r_  ra  rd  s        r;   r{  zDTestSpecial.test_subclasses_with_reduce_ex.<locals>.NamedInt.__new__  rf  r=   c                 2    | j                   | j                  fS r   r  r   r  s     r;   r  zJTestSpecial.test_subclasses_with_reduce_ex.<locals>.NamedInt.__reduce_ex__  r  r=   c                     | j                   S r   rk  r   s    r;   rE   zETestSpecial.test_subclasses_with_reduce_ex.<locals>.NamedInt.__name__  rl  r=   c                     dj                  t        |       j                  | j                  t        j	                  |             S rn  ro  r   s    r;   r	  zETestSpecial.test_subclasses_with_reduce_ex.<locals>.NamedInt.__repr__  rp  r=   c                 |    t         }|j                  }|j                  t        u r|j	                  |       S  ||       S r   rr  rt  s      r;   r  zDTestSpecial.test_subclasses_with_reduce_ex.<locals>.NamedInt.__str__  rw  r=   c                     t        |       t        |      z   }t        |       r9t        |      r- dj                  | j                  |j                        |      S |S ry  rz  r{  s      r;   r}  zDTestSpecial.test_subclasses_with_reduce_ex.<locals>.NamedInt.__add__  r~  r=   N)
rE   rF   rG   r{  r  r  r  r	  r  r}  r  s   r;   r]  r    r  r=   r]  c                       e Zd ZdZdZdZy)7TestSpecial.test_subclasses_with_reduce_ex.<locals>.NEIr  r  r  Nr  rK   r=   r;   r  r    r  r=   r  r  r  rE  r'   r  r  s      @r;   test_subclasses_with_reduce_exz*TestSpecial.test_subclasses_with_reduce_ex  s    (	 s (	 T	(D 	
 	ckk4<<0ceeceem,.NO (	*	%vq!a d..Q7a(dmmSUU3dmmS1r=   c                     G fddt                G d dt              }| j                  |j                  t        j                         | j	                  t        |j                  |j                  z         d       t               d<   |t               d<    dd      }| j	                  |d       | j	                  |j                  j                  d       | j                  t        d	      5  t        | j                  |j                         d d d        t        j                  |_        t        | j                  |j                         t        | j                  |       y # 1 sw Y   UxY w)
Nc                   R    e Zd ZdZd Zej
                  d        Z d Zd Z fdZy)KTestSpecial.test_subclasses_without_direct_pickle_support.<locals>.NamedIntr]  c                     |}|^}}t        |      dk(  rt        d      t        j                  | g| }||_        ||_        |S r_  ra  rd  s        r;   r{  zSTestSpecial.test_subclasses_without_direct_pickle_support.<locals>.NamedInt.__new__  rf  r=   c                     | j                   S r   rk  r   s    r;   rE   zTTestSpecial.test_subclasses_without_direct_pickle_support.<locals>.NamedInt.__name__  rl  r=   c                     dj                  t        |       j                  | j                  t        j	                  |             S rn  ro  r   s    r;   r	  zTTestSpecial.test_subclasses_without_direct_pickle_support.<locals>.NamedInt.__repr__  rp  r=   c                 |    t         }|j                  }|j                  t        u r|j	                  |       S  ||       S r   rr  rt  s      r;   r  zSTestSpecial.test_subclasses_without_direct_pickle_support.<locals>.NamedInt.__str__  rw  r=   c                     t        |       t        |      z   }t        |       r9t        |      r- dj                  | j                  |j                        |      S |S ry  rz  r{  s      r;   r}  zSTestSpecial.test_subclasses_without_direct_pickle_support.<locals>.NamedInt.__add__  sW    4y3;.dH-*UH2M#%,,T]]ENNK   Kr=   N	rE   rF   rG   r{  r  r  r	  r  r}  r  s   r;   r]  r    s4    %L ^^% %& r=   r]  c                       e Zd ZdZdZdZy)FTestSpecial.test_subclasses_without_direct_pickle_support.<locals>.NEIr  r  r  Nr  rK   r=   r;   r  r    r  r=   r  r  r  rE  r'   r`  )r  r   r  r{  r   r  r  r  r$  r`  r   r  rx   r.   pickle_by_enum_namer  r  s      @r;   -test_subclasses_without_direct_pickle_supportz9TestSpecial.test_subclasses_without_direct_pickle_support  s   %	 s %	 N	(D 	 	ckk4<<0ceeceem,.NO (	*	%vq!a a(##I/QR!$--7 S !44dmmSUU3dmmS1 SRs   0!E%%E.c                 "    G fddt                G d dt              }| j                  |j                  t        j                         | j	                  t        |j                  |j                  z         d       t               d<   |t               d<    dd      }| j	                  |d       | j	                  |j                  j                  d       t        | j                  |j                         t        | j                  |       y )	Nc                   R    e Zd ZdZd Zej
                  d        Z d Zd Z fdZy)HTestSpecial.test_subclasses_with_direct_pickle_support.<locals>.NamedIntr]  c                     |}|^}}t        |      dk(  rt        d      t        j                  | g| }||_        ||_        |S r_  ra  rd  s        r;   r{  zPTestSpecial.test_subclasses_with_direct_pickle_support.<locals>.NamedInt.__new__  rf  r=   c                     | j                   S r   rk  r   s    r;   rE   zQTestSpecial.test_subclasses_with_direct_pickle_support.<locals>.NamedInt.__name__	  rl  r=   c                     dj                  t        |       j                  | j                  t        j	                  |             S rn  ro  r   s    r;   r	  zQTestSpecial.test_subclasses_with_direct_pickle_support.<locals>.NamedInt.__repr__		  rp  r=   c                 |    t         }|j                  }|j                  t        u r|j	                  |       S  ||       S r   rr  rt  s      r;   r  zPTestSpecial.test_subclasses_with_direct_pickle_support.<locals>.NamedInt.__str__	  rw  r=   c                     t        |       t        |      z   }t        |       r9t        |      r- dj                  | j                  |j                        |      S |S ry  rz  r{  s      r;   r}  zPTestSpecial.test_subclasses_with_direct_pickle_support.<locals>.NamedInt.__add__	  r~  r=   Nr  r  s   r;   r]  r    s4    %L ^^% %& r=   r]  c                       e Zd ZdZdZdZd Zy)CTestSpecial.test_subclasses_with_direct_pickle_support.<locals>.NEIr  r  r  c                 >    t         | j                  | j                  ffS r   )r[  rU  r  r  s     r;   r  zQTestSpecial.test_subclasses_with_direct_pickle_support.<locals>.NEI.__reduce_ex__'	  s     ===r=   N)rE   rF   rG   r  r  r  rK   r=   r;   r  r  #	  s     LAA>r=   r  r  r  rE  r'   )r  r   r  r{  r   r  r  r  r$  r`  rx   r  s      @r;   *test_subclasses_with_direct_pickle_supportz6TestSpecial.test_subclasses_with_direct_pickle_support  s    &	 s &	 P	>(D 	> 	ckk4<<0ceeceem,.NO (	*	%vq!a a(dmmSUU3dmmS1r=   c                 H    G d dt         t              }| j                  t        |j                        |       | j                  |j                  t                | j                  |j                  d       |t               d<   t        | j                  |j                         y )Nc                       e Zd ZdZdZdZdZy)2TestSpecial.test_tuple_subclass.<locals>.SomeTuple	SomeTuple)rB   for the money)r'   for the showrC   for the musicNr  rK   r=   r;   r  r  5	  s    &L(E(F(Er=   r  r  )r  r   r  r  r  assertIsInstancer  r   r	  r$  rx   )r   r  s     r;   test_tuple_subclasszTestSpecial.test_tuple_subclass4	  sr    	)t 	)
 	d9??+Y7i..6*>?!*	+dmmY__=r=   c                 0   ddl m}  |dd      } G d d|t              }| j                  t	        |j
                        |       | j                  |j                  j                  d       | j                  |j                  j                  |       | j                  |j
                  j                  d       | j                  |j                  j                  d	       |t               d<   |t               d<   t        | j                  |j
                         y )
Nr   
namedtupleT
index descc                   F    e Zd ZdZ e       dfZ e       dfZ e       dfZy)=TestSpecial.test_tuple_subclass_with_auto_1.<locals>.SomeEnumSomeEnumr  r  r  NrE   rF   rG   r   r  r  r	  rK   r=   r;   r  r  C	  s+    %LFO+EV^+FFO+Er=   r  r  rB   r  collectionsr  r   r  r  r  r   r	  r`  r  indexr  descr$  rx   )r   r  r  r  s       r;   test_tuple_subclass_with_auto_1z+TestSpecial.test_tuple_subclass_with_auto_1@	  s    *sL)	,q$ 	,
 	d8>>*H5--/CDhnn22A6--q1--~> (	*	#dmmX^^<r=   c                 \   ddl m}  |dd       G fddt              }| j                  t	        |j
                        |       | j                  |j                  j                  d       | j                  |j                  j                         | j                  |j
                  j                  j                  d       | j                  |j                  j                  j                  d	       |t               d<   t               d<   t        | j                  |j
                         y )
Nr   r  r  r  c                   l    e Zd ZdZ W   e       d      Z W   e       d      Z W   e       d      Zy)=TestSpecial.test_tuple_subclass_with_auto_2.<locals>.SomeEnumr  r  r  r  Nr  )r  s   r;   r  r  T	  s2    %Ldfo.Etv~.Fdfo.Er=   r  r  rB   r  r  )r   r  r  r  s      @r;   test_tuple_subclass_with_auto_2z+TestSpecial.test_tuple_subclass_with_auto_2Q	  s    *sL)	/t 	/
 	d8>>*H5--/CDhnn22A6--33Q7..33^D (	*	#dmmX^^<r=   c                 t    G d dt               }| j                  t        |      |j                  |j                  |j
                  g       | j                  t        |j                        d       | j                  |j
                  j                  d       | j                   |d      |j                         y )Nc                   $    e Zd ZdZdZdZd Zd Zy)LTestSpecial.test_duplicate_values_give_unique_enum_items.<locals>.AutoNumberrK   c                 n    t        | j                        dz   }t        j                  |       }||_        |S NrB   r  __members__r  r{  r  ri  r`  r{   s      r;   r{  zTTestSpecial.test_duplicate_values_give_unique_enum_items.<locals>.AutoNumber.__new__g	  /    COO,q0nnS)#
r=   c                 ,    t        | j                        S r   r  r  r   s    r;   r  zTTestSpecial.test_duplicate_values_give_unique_enum_items.<locals>.AutoNumber.__int__l	      4<<((r=   N)rE   rF   rG   r  r  r	  r{  r  rK   r=   r;   
AutoNumberr  c	  s    EFE
)r=   r  r'   rC   rB   )	r   r   r   r  r  r	  r  r`  r  )r   r  s     r;   ,test_duplicate_values_give_unique_enum_itemsz8TestSpecial.test_duplicate_values_give_unique_enum_itemsb	  s    
	) 
	) 	Z !!:#4#4j6F6FG	 	Z../3))//3jmZ%5%56r=   c                     G d dt               } G d d|      }| j                  t        |      |j                  |j                  |j
                  g       | j                  t        t        t        |            g d       y )Nc                       e Zd Zd Zd Zy)ETestSpecial.test_inherited_new_from_enhanced_enum.<locals>.AutoNumberc                 n    t        | j                        dz   }t        j                  |       }||_        |S r  r  r  s      r;   r{  zMTestSpecial.test_inherited_new_from_enhanced_enum.<locals>.AutoNumber.__new__x	  r  r=   c                 ,    t        | j                        S r   r  r   s    r;   r  zMTestSpecial.test_inherited_new_from_enhanced_enum.<locals>.AutoNumber.__int__}	  r  r=   N)rE   rF   rG   r{  r  rK   r=   r;   r  r   w	  s    
)r=   r  c                       e Zd ZdZdZdZy)@TestSpecial.test_inherited_new_from_enhanced_enum.<locals>.ColorrK   Nr  rK   r=   r;   r  r  	      CEDr=   r  rF  )r   r   r   r  r  r  mapr  r   r  r  s      r;   %test_inherited_new_from_enhanced_enumz1TestSpecial.test_inherited_new_from_enhanced_enumv	  s^    	) 	)	J 	 	euyy%++uzz&JKc#uo.	:r=   c                     G d dt               } G d d|      }| j                  t        |      |j                  |j                  |j
                  g       | j                  t        t        t        |            g d       y )Nc                       e Zd Zd Zy)BTestSpecial.test_inherited_new_from_mixed_enum.<locals>.AutoNumberc                 p    t        | j                        dz   }t        j                  | |      }||_        |S r  )r  r  r  r{  r  r  s      r;   r{  zJTestSpecial.test_inherited_new_from_mixed_enum.<locals>.AutoNumber.__new__	  s1    COO,q0kk#u-#
r=   Nr  rK   r=   r;   r  r  	      r=   r  c                       e Zd ZdZdZdZy)=TestSpecial.test_inherited_new_from_mixed_enum.<locals>.ColorrK   Nr  rK   r=   r;   r  r  	  r  r=   r  rF  )r   r   r   r  r  r  r  r  r  s      r;   "test_inherited_new_from_mixed_enumz.TestSpecial.test_inherited_new_from_mixed_enum	  s^    	 		J 	 	euyy%++uzz&JKc#uo.	:r=   c                      G d dt               }| j                  t        |j                         | j                  |j                  t               y )Nc                       e Zd ZdZy)/TestSpecial.test_equality.<locals>.OrdinaryEnumrB   N)rE   rF   rG   r   rK   r=   r;   OrdinaryEnumr  	  rN  r=   r  )r   r   r#   r   )r   r  s     r;   test_equalityzTestSpecial.test_equality	  s6    	4 	LNN33r=   c                      G d dt               } G d d|      }| j                  |j                  |j                         | j	                  |j
                  |j                         | j                  |j                  |j                         | j                  |j                  |j                         | j                  |j                  |j                         | j                  |j                  |j                         y )Nc                   $    e Zd Zd Zd Zd Zd Zy)3TestSpecial.test_ordered_mixin.<locals>.OrderedEnumc                 p    | j                   |j                   u r| j                  |j                  k\  S t        S r   rU  r  NotImplementedr   r|  s     r;   __ge__z:TestSpecial.test_ordered_mixin.<locals>.OrderedEnum.__ge__	  +    >>U__4<<5==88%%r=   c                 p    | j                   |j                   u r| j                  |j                  kD  S t        S r   r  r  s     r;   __gt__z:TestSpecial.test_ordered_mixin.<locals>.OrderedEnum.__gt__	  +    >>U__4<<%--77%%r=   c                 p    | j                   |j                   u r| j                  |j                  k  S t        S r   r  r  s     r;   __le__z:TestSpecial.test_ordered_mixin.<locals>.OrderedEnum.__le__	  r  r=   c                 p    | j                   |j                   u r| j                  |j                  k  S t        S r   r  r  s     r;   __lt__z:TestSpecial.test_ordered_mixin.<locals>.OrderedEnum.__lt__	  r!  r=   N)rE   rF   rG   r  r   r#  r%  rK   r=   r;   OrderedEnumr  	  s    &&&&r=   r&  c                        e Zd ZdZdZdZdZdZy)-TestSpecial.test_ordered_mixin.<locals>.GraderE  rS   rC   r'   rB   Nr>  rK   r=   r;   Grader(  	  rC  r=   r)  )r   assertGreaterrL  r  assertLessEqualrA  r?  
assertLessr@  assertGreaterEqualr   r   )r   r&  r)  s      r;   test_ordered_mixinzTestSpecial.test_ordered_mixin	  s    	&$ 	&"	K 	 	577EGG,UWWegg.)1%''*EGGUWW-r=   c                      G d dt               } G d d|      }| j                  t              5   G d d|      }d d d        y # 1 sw Y   y xY w)Nc                       e Zd Zd Zy)*TestSpecial.test_extending2.<locals>.Shadec                 .    t        | j                         y r   )printr   r   s    r;   shadez0TestSpecial.test_extending2.<locals>.Shade.shade	  s    dii r=   NrE   rF   rG   r4  rK   r=   r;   Shader1  	  rh  r=   r6  c                       e Zd ZdZdZdZy)*TestSpecial.test_extending2.<locals>.ColorrB   r'   rC   Nr  rK   r=   r;   r  r8  	  r  r=   r  c                       e Zd ZdZdZdZy).TestSpecial.test_extending2.<locals>.MoreColorrS   rE  r  Nr  rK   r=   r;   r  r:  	  r  r=   r  )r   rp  r  r   r6  r  r  s       r;   test_extending2zTestSpecial.test_extending2	  sB    	!D 	!	E 	 y)E  *))   AAc                      G d dt               } G d d|      } G d d|      }| j                  |j                  j                         d       y )Nc                       e Zd Zd Zy)*TestSpecial.test_extending3.<locals>.Shadec                     | j                   S r   r  r   s    r;   r4  z0TestSpecial.test_extending3.<locals>.Shade.shade	  s    yy r=   Nr5  rK   r=   r;   r6  r@  	  rh  r=   r6  c                       e Zd Zd Zy)*TestSpecial.test_extending3.<locals>.Colorc                      d| j                   z  S )Nz%s hexlified!r  r   s    r;   r  z.TestSpecial.test_extending3.<locals>.Color.hex	  s    &33r=   N)rE   rF   rG   r  rK   r=   r;   r  rC  	  r>  r=   r  c                       e Zd ZdZdZdZy).TestSpecial.test_extending3.<locals>.MoreColorrS   rE  r  Nr  rK   r=   r;   r  rF  	  s    DGFr=   r  z5 hexlified!)r   r   r  r  r;  s       r;   test_extending3zTestSpecial.test_extending3	  sG    	!D 	!	4E 	4	 	 	**..0.Ar=   c                      G d dt               } G d d|      }| j                  t        |j                        |       y )Nc                       e Zd Zd Zy)6TestSpecial.test_subclass_duplicate_name.<locals>.Basec                      y r   rK   r   s    r;   r  z;TestSpecial.test_subclass_duplicate_name.<locals>.Base.test	  rS  r=   NrE   rF   rG   r  rK   r=   r;   BaserJ  	      r=   rM  c                       e Zd ZdZy)6TestSpecial.test_subclass_duplicate_name.<locals>.TestrB   NrL  rK   r=   r;   r  rP  	      Dr=   r  )r   r  r  r  )r   rM  r  s      r;   test_subclass_duplicate_namez(TestSpecial.test_subclass_duplicate_name	  s0    	4 		4 	d499ot,r=   c                    ddl m  G fddt              } G d d|      }| j                  |j                  j                  d       | j                  |j                  j
                  d        G d	 d
t              } G d d|      }| j                  |j                  j                  d       | j                  |j                  j
                  d       y )Nr   DynamicClassAttributec                        e Zd ZW  d        Zy)>TestSpecial.test_subclass_duplicate_name_dynamic.<locals>.Basec                      y)NdynamicrK   r   s    r;   r  zCTestSpecial.test_subclass_duplicate_name_dynamic.<locals>.Base.test	  s     r=   NrL  rT  s   r;   rM  rW  	  s    "! #!r=   rM  c                       e Zd ZdZy>TestSpecial.test_subclass_duplicate_name_dynamic.<locals>.TestrB   NrL  rK   r=   r;   r  r\  	  rQ  r=   r  rY  rB   c                   0    e Zd Zej                  d        Zy)?TestSpecial.test_subclass_duplicate_name_dynamic.<locals>.Base2c                      y)Nflashy dynamicrK   r   s    r;   flashzETestSpecial.test_subclass_duplicate_name_dynamic.<locals>.Base2.flash	  s    'r=   N)rE   rF   rG   r.   r  ra  rK   r=   r;   Base2r^  	  s    ]]( (r=   rb  c                       e Zd ZdZyr[  )rE   rF   rG   ra  rK   r=   r;   r  z>TestSpecial.test_subclass_duplicate_name_dynamic.<locals>.Test	  s    Er=   r`  )typesrU  r   r   r  r`  ra  )r   rM  r  rb  rU  s       @r;   $test_subclass_duplicate_name_dynamicz0TestSpecial.test_subclass_duplicate_name_dynamic	  s    /	!4 	!	4 	3!,	(D 	(	5 	))+;<))1-r=   c                      G d dt               } G d d|      }| j                  t              5   G d d|      }d d d        y # 1 sw Y   y xY w)Nc                       e Zd Zd Zy)2TestSpecial.test_no_duplicates.<locals>.UniqueEnumc                       j                   }t         fd|D              r9 j                  } | j                        j                  }t	        d|d|      y )Nc              3   P   K   | ]  }j                   |j                   k(    y wr   r  )r  r%  r   s     r;   r  zNTestSpecial.test_no_duplicates.<locals>.UniqueEnum.__init__.<locals>.<genexpr>	  s     :ctzzQWW,cs   #&z$aliases not allowed in UniqueEnum:  z --> )rU  anyr   r`  r   )r   re  ri  r   r%  s   `    r;   r   z;TestSpecial.test_no_duplicates.<locals>.UniqueEnum.__init__	  sR    nn:c::		ADJJ,,A$ !%  ;r=   NrE   rF   rG   r   rK   r=   r;   
UniqueEnumrh  	  s    r=   rm  c                       e Zd ZdZdZdZy-TestSpecial.test_no_duplicates.<locals>.ColorrB   r'   rC   Nr  rK   r=   r;   r  rp  	  r  r=   r  c                       e Zd ZdZdZdZdZyro  )rE   rF   rG   r  r  r  grenerK   r=   r;   r  z-TestSpecial.test_no_duplicates.<locals>.Color	  s    r=   )r   rp  r   )r   rm  r  s      r;   test_no_duplicateszTestSpecial.test_no_duplicates	  sB    		 			J 	 z*
  +**r=  c                      G d dt               }| j                  t        |j                  j                  d      d       | j                  |j                  j
                  d       y )Nc                   V    e Zd ZdZdZdZdZdZdZdZ	dZ
d	 Zej                  d
        Zy)%TestSpecial.test_init.<locals>.Planet)gITf|Dg    
BA)gQX4Eg    WAgoEg    TXA)g	Dg    (IA)gcEg   A)g[\h}Eg    ，A)g#'?TQEg   _xA)gJ-UEg    wAc                      || _         || _        y r   massradius)r   rz  r{  s      r;   r   z.TestSpecial.test_init.<locals>.Planet.__init__
  s     	$r=   c                 X    d}|| j                   z  | j                  | j                  z  z  S )NgyдW=ry  )r   r!  s     r;   surface_gravityz5TestSpecial.test_init.<locals>.Planet.surface_gravity
  s)      499}dkk(ABBr=   N)rE   rF   rG   MERCURYVENUSEARTHMARSJUPITERSATURNURANUSNEPTUNEr   r.   r  r}  rK   r=   r;   Planetrv  
  sI    +G+E,E+D+G+F+F+G% ]]C Cr=   r  r'   g#@rw  )r   r   roundr  r}  r`  )r   r  s     r;   	test_initzTestSpecial.test_init
  sN    	CT 	C" 	v||;;Q?F++-CDr=   c                     G d dt         t              }| j                  t        |d             | j                  t        |d             | j                  t        |d             | j	                  t        |j                  t                      | j	                  |j                  |j                  u        | j	                  |j                  |j                  u        y )Nc                       e Zd ZdZd ZdZ e       Z ed      D ]  Z	e	dz  dfede	z  <     ed      D ]  Z	e	d	z  d
fede	z  <     ed      D ]  Z	e	dfede	z  <    e
ZeZeZy)'TestSpecial.test_ignore.<locals>.Periodz3
            different lengths of time
            c                 N    t        j                  | |      }||_        ||_        |S r   )r&   r{  r  period)ri  r`  r  r{   s       r;   r{  z/TestSpecial.test_ignore.<locals>.Period.__new__
  s'    ''U3##

r=   zPeriod ir  r  r#  zmonth_%d5   r   weekzweek_%d    dayzday_%dN)rE   rF   rG   r   r{  _ignore_varsr  rt   r  day_1OneDayweek_1OneWeekmonth_1OneMonthrK   r=   r;   r  r  
  s    
 "HVF2Y)*2wzA~& 2Y()!Vy1}% 2Y'(%xx!|$ FGHr=   r  r  r  )r&   r   r   ro  r   r  r  r  day_30week_4day_28r  s     r;   test_ignorezTestSpecial.test_ignore
  s    	Y 	( 	4523-.
6<<;<&--7867r=   c                 `    G d dt               } G d d|      }| j                  t        |      |j                  |j                  |j
                  g       t        |t        d            D ]@  \  }}|dz  }| j                  |j                  |g       | j                   ||g      |       B y )Nc                       e Zd Zd Zy)9TestSpecial.test_nonhash_value.<locals>.AutoNumberInAListc                 p    t        | j                        dz   g}t        j                  |       }||_        |S r  r  r  s      r;   r{  zATestSpecial.test_nonhash_value.<locals>.AutoNumberInAList.__new__8
  s2    S__-12nnS)#
r=   Nr  rK   r=   r;   AutoNumberInAListr  7
  r  r=   r  c                       e Zd ZdZdZdZy)4TestSpecial.test_nonhash_value.<locals>.ColorInAListrK   Nr  rK   r=   r;   ColorInAListr  =
  r  r=   r  rC   rB   )
r   r   r   r  r  r  r  rt   r`  r  )r   r  r  r.   r`  s        r;   test_nonhash_valuezTestSpecial.test_nonhash_value6
  s    	 		, 	 	l+l.>.>@R@RT`TeTe-fg|U1X6KD%QJETZZ%1MM,w/6 7r=   c                      G d dt         t              } G d d|      }| j                  t        |      |j                  |j
                  g       | j                  |j                  d       | j                   |d      |j                         y )Nc                       e Zd Zd Zy)KTestSpecial.test_conflicting_types_resolved_in_new.<locals>.LabelledIntEnumc                 X    |\  }}t         j                  | |      }||_        ||_        |S r   )r  r{  labelr  )ri  re  r`  r  r{   s        r;   r{  zSTestSpecial.test_conflicting_types_resolved_in_new.<locals>.LabelledIntEnum.__new__I
  s.    #ukk#u-!	#
r=   Nr  rK   r=   r;   LabelledIntEnumr  H
  s    r=   r  c                       e Zd ZdZdZy)HTestSpecial.test_conflicting_types_resolved_in_new.<locals>.LabelledList)rB   Unprocessed)r'   zPayment CompleteN)rE   rF   rG   unprocessedpayment_completerK   r=   r;   LabelledListr  P
  s    ,K6r=   r  rB   )r  r   r   r   r  r  )r   r  r  s      r;   &test_conflicting_types_resolved_in_newz2TestSpecial.test_conflicting_types_resolved_in_newG
  st    	c4 		7? 	7 	l+l.F.FHeHe-fg1115a,*B*BCr=   c                      G d dt               }	  |d       t        d      # t        $ r'}| j                  |j                  d u        Y d }~y d }~ww xY w)Nc                       e Zd ZdZdZdZy)DTestSpecial.test_default_missing_no_chained_exception.<locals>.ColorrB   r'   rC   N)rE   rF   rG   r  r  r  rK   r=   r;   r  r  Y
  r  r=   r  r   Exception not raised.)r   r  r   r   r  r   r  excs      r;   )test_default_missing_no_chained_exceptionz5TestSpecial.test_default_missing_no_chained_exceptionX
  sR    	D 		5!H 344  	5OOCOOt344	5s   $ 	AAAc                 >    G d dt               }| j                   |d      |j                         	  |d       t        d      # t        $ r'}| j                  |j                  d u        Y d }~nd }~ww xY w	  |d       t        d      # t        $ r3}| j                  t        |j                  t                     Y d }~nd }~ww xY w	  |d       t        d      # t        $ r3}| j                  t        |j                  t                     Y d }~y d }~ww xY w)Nc                   (    e Zd ZdZdZdZed        Zy)0TestSpecial.test_missing_override.<locals>.ColorrB   r'   rC   c                 H    |dk(  r| j                   S |dk(  ry|dk(  rt        y )NrK  
bad returnrE  	error out)r  ZeroDivisionError)ri  r
  s     r;   	_missing_z:TestSpecial.test_missing_override.<locals>.Color._missing_i
  s0    7?88O\)[(++  r=   N)rE   rF   rG   r  r  r  classmethodr  rK   r=   r;   r  r  e
  s#    CED
  
 r=   r  rK  r   r  r  r  )
r   r  r  r  r   r   r  r  r  r  r  s      r;   test_missing_overridez!TestSpecial.test_missing_overrided
  s    	 D 	   	eGnejj1	5!H 344  	5OOCOOt344	5	5, 344  	EOOJs
CDD	E	5+ 344 ! 	EOOJs
CDD	EsG   A 	A6A11A6:B 	C	)CC	C   	D))DDc                 H   dd l }dd l} G d dt        j                         G d d      } G fdd      }|j	                   |             }|j	                   |             }|j                          | j                   |       d        | j                   |       d        y )Nr   c                       e Zd ZdZdZy);TestSpecial.test_missing_exceptions_reset.<locals>.TestEnumval1val2N)rE   rF   rG   VAL1VAL2rK   r=   r;   TestEnumr  
  s    DDr=   r  c                       e Zd Zd Zy)9TestSpecial.test_missing_exceptions_reset.<locals>.Class1c                 6    	 t               # t         $ r Y y w xY wr   r   r   s    r;   r   zBTestSpecial.test_missing_exceptions_reset.<locals>.Class1.__init__
  s!    $,&! s   
 	Nrl  rK   r=   r;   Class1r  
  s    r=   r  c                       e Zd Z fdZy)9TestSpecial.test_missing_exceptions_reset.<locals>.Class2c                 6    	  d       y # t         $ r Y y w xY w)Ninvalid_valuer  )r   r  s    r;   r   zBTestSpecial.test_missing_exceptions_reset.<locals>.Class2.__init__
  s"    _-! s    	Nrl  )r  s   r;   Class2r  
  s    r=   r  )gcweakrefr.   r   refcollectr  )r   r  r  r  r  class_1_refclass_2_refr  s          @r;   test_missing_exceptions_resetz)TestSpecial.test_missing_exceptions_reset
  sz    	tyy 		 		 	 kk&(+kk&(+
 	

kmT*kmT*r=   c                   
  G d d      } G d d      
 G d dt               } G d dt               } G d	 d
|t               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d       | j                  |j                  d       | j                  t        |j
                        d        G 
fdd
|
t               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d       | j                  |j                  d       | j                  t        |j
                        d        G 
fdd

|t               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d       | j                  |j                  d       | j                  t        |j
                        d        G 
fdd
|t               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d       | j                  t        |j
                        d       | j                  |j                  j                         d        G 
fdd
|t               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d       | j                  t        |j
                        d       | j                  |j                  j                         d       | j                  |j                  j                         d        G 
fdd
||      }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d       | j                  t        |j
                        d       | j                  |j                  j                         d       | j                  |j                  j                         d        G 
fdd
||      }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d       | j                  t        |j
                        d       | j                  |j                  j                         d       | j                  |j                  j                         d        G 
fdd
t        ||      }	| j                  |	j                  j                  d       | j                  |	j                  j                  d       | j                  |	j
                  j                  d       | j                  t        |	j
                        d       | j                  |	j                  j                         d       | j                  |j                  j                         d       | j                  t        |	t                     y )Nc                       e Zd Zed        Zy)1TestSpecial.test_multiple_mixin.<locals>.MaxMixinc                 *    t        |       }|| _        |S r   )r  MAX)ri  maxs     r;   r  z5TestSpecial.test_multiple_mixin.<locals>.MaxMixin.MAX
  s    #h
r=   N)rE   rF   rG   r   r  rK   r=   r;   MaxMixinr  
  s     r=   r  c                       e Zd Zd Zy)1TestSpecial.test_multiple_mixin.<locals>.StrMixinc                 6    | j                   j                         S r   r  lowerr   s    r;   r  z9TestSpecial.test_multiple_mixin.<locals>.StrMixin.__str__
      {{((**r=   NrE   rF   rG   r  rK   r=   r;   StrMixinr  
      +r=   r  c                       e Zd Zd Zy)1TestSpecial.test_multiple_mixin.<locals>.SomeEnumc                      y)NbooyahrK   r   s    r;   behaviorz:TestSpecial.test_multiple_mixin.<locals>.SomeEnum.behavior
      r=   N)rE   rF   rG   r  rK   r=   r;   r  r  
  s     r=   r  c                       e Zd Zd Zd Zy)4TestSpecial.test_multiple_mixin.<locals>.AnotherEnumc                      y)Nnuhuh!rK   r   s    r;   r  z=TestSpecial.test_multiple_mixin.<locals>.AnotherEnum.behavior
  r  r=   c                      y)N
what's up?rK   r   s    r;   socialz;TestSpecial.test_multiple_mixin.<locals>.AnotherEnum.social
  s    #r=   N)rE   rF   rG   r  r  rK   r=   r;   AnotherEnumr  
  s     $r=   r  c                   6    e Zd Z e       Z e       Z e       Zy.TestSpecial.test_multiple_mixin.<locals>.ColorNrE   rF   rG   r   r  r  r  rK   r=   r;   r  r  
      &CFE6Dr=   r  rB   r'   rC   
Color.BLUEc                   R    e Zd Z e       Z e       Z e       ZW  j                  Zyr  rE   rF   rG   r   r  r  r  r  r  s   r;   r  z.TestSpecial.test_multiple_mixin.<locals>.Color
  #    &CFE6D&&Gr=   r  c                   R    e Zd Z e       Z e       Z e       ZW  j                  Zyr  r  r  s   r;   r  z.TestSpecial.test_multiple_mixin.<locals>.Color
  r  r=   c                   R    e Zd Z e       Z e       Z e       ZW  j                  Zy)2TestSpecial.test_multiple_mixin.<locals>.CoolColorNr  r  s   r;   	CoolColorr  
  r  r=   r	  r  c                   R    e Zd Z e       Z e       Z e       ZW  j                  Zy)4TestSpecial.test_multiple_mixin.<locals>.CoolerColorNr  r  s   r;   CoolerColorr  
  r  r=   r  r  r  c                   R    e Zd Z e       Z e       Z e       ZW  j                  Zy)5TestSpecial.test_multiple_mixin.<locals>.CoolestColorNr  r  s   r;   CoolestColorr  
  r  r=   r  c                   R    e Zd Z e       Z e       Z e       ZW  j                  Zy)6TestSpecial.test_multiple_mixin.<locals>.ConfusedColorNr  r  s   r;   ConfusedColorr  
  r  r=   r  c                   R    e Zd Z e       Z e       Z e       ZW  j                  Zy)6TestSpecial.test_multiple_mixin.<locals>.ReformedColorNr  r  s   r;   ReformedColorr    r  r=   r  )r   r   r  r`  r  r  r  rY  r  r  r   r   r
  r  )r   r  r  r  r  r	  r  r  r  r  r  s             @r;   test_multiple_mixinzTestSpecial.test_multiple_mixin
  sl   	 		+ 	+	 t 	 	$$ 	$
	Hd 	 	!,**A.))1-A&UZZ,7	'Hh 	'
 	!,**A.))1-A&UZZ&1	'Hh 	'
 	!,**A.))1-A&UZZ&1	'(D 	'
 	,,a0..2--q1Y^^,f5//18<	'(K 	'
 	..2**00!4))//3[--.7113X>//1<@	'8X{ 	'
 	))//3++1115**00!4\../8))224h?))002LA	'Hk8 	'
 	**00!4,,22A6++1115]//0&9**335x@**113\B	'Hgx 	'
 	**00!4,,22A6++1115]//0&9**335x@**113\B
=#67r=   c                 z    t          G d dt                     } G d dt              }t          G d d|             }y )Nc                       e Zd ZdZdZdZy)<TestSpecial.test_multiple_inherited_mixin.<locals>.Decision1REVERT
REVERT_ALLRETRYNrE   rF   rG   r  r  r  rK   r=   r;   	Decision1r        F%JEr=   r  c                       e Zd Zy)9TestSpecial.test_multiple_inherited_mixin.<locals>.MyEnumNr   rK   r=   r;   r   r!    r   r=   r   c                       e Zd ZdZdZdZy)<TestSpecial.test_multiple_inherited_mixin.<locals>.Decision2r  r  r  Nr  rK   r=   r;   	Decision2r#    r  r=   r$  )r   r	   )r   r  r   r$  s       r;   test_multiple_inherited_mixinz)TestSpecial.test_multiple_inherited_mixin  s@    		 	 
		W 			 	 
	r=   c                     G d dt               } G d d       G fdd|t        j                        } G d d|      }| j                  t	        |j
                  |             | j                  |j                  |       | j                  t        |j
                        d	        G d
 d|      }| j                  |j
                  d       y )Nc                        e Zd Z fdZ xZS )8TestSpecial.test_multiple_mixin_inherited.<locals>.MyIntc                 $    t         |   | |      S r   ry  )ri  r`  rU  s     r;   r{  z@TestSpecial.test_multiple_mixin_inherited.<locals>.MyInt.__new__"  s    wsE22r=   rI  r~  s   @r;   rg  r(  !  s    3 3r=   rg  c                       e Zd Zd Zy);TestSpecial.test_multiple_mixin_inherited.<locals>.HexMixinc                     t        |       S r   r  r   s    r;   r	  zDTestSpecial.test_multiple_mixin_inherited.<locals>.HexMixin.__repr__&  r  r=   Nr=  rK   r=   r;   HexMixinr+  %  rh  r=   r-  c                   (    e Zd ZW  j                  Zy)<TestSpecial.test_multiple_mixin_inherited.<locals>.MyIntEnumNr=  )r-  s   r;   	MyIntEnumr/  )  s    ((Hr=   r0  c                       e Zd ZdZy)6TestSpecial.test_multiple_mixin_inherited.<locals>.FoorB   N)rE   rF   rG   TESTrK   r=   r;   r  r2  ,  rQ  r=   r  0x1c                       e Zd ZdZd Zy)6TestSpecial.test_multiple_mixin_inherited.<locals>.FeerB   c                 J    |dz  }t         j                  | |      }||_        |S r  r  r{  r  )ri  r`  r   s      r;   r{  z>TestSpecial.test_multiple_mixin_inherited.<locals>.Fee.__new__4  s'    
S%0!&r=   N)rE   rF   rG   r3  r{  rK   r=   r;   Feer6  2  s    Dr=   r9  r'   )	r  r.   r   r   r  r3  r   rX  r  )r   rg  r0  r  r9  r-  s        @r;   test_multiple_mixin_inheritedz)TestSpecial.test_multiple_mixin_inherited   s    	3C 	3	! 	!	)% 	)	) 	
388U34**E2chh/	) 	 	1%r=   c                      G d dt         t              } G d dt         t              } G d d||      }|}| j                  t        |      |j                  |j
                  |j                  g       | j                  |j                  d       | j                  |j                  j                  d       | j                   |d      |j                         | j                  |j                  j                          |d	      }| j                  t        |      |j                  |j
                  |j                  g       | j                  |j                  d       | j                  |j                  j                  d       | j                   |d      |j                         | j                  |j                  j                         | j                  t        ||             | j                  |j                         y )
Nc                   (     e Zd Ze fd       Z xZS )UTestSpecial.test_multiple_mixin_with_common_data_type.<locals>.CaseInsensitiveStrEnumc                     | j                   j                         D ]1  }|j                  j                         |j                         k(  s/|c S  t        |   |      S r   )_member_map_r8  r  r  rz  r  )ri  r`  r   rU  s      r;   r  z_TestSpecial.test_multiple_mixin_with_common_data_type.<locals>.CaseInsensitiveStrEnum._missing_=  sN    !..557F~~++->% 8 w(//r=   )rE   rF   rG   r  r  r}  r~  s   @r;   CaseInsensitiveStrEnumr=  <  s    0 0r=   r@  c                   F    e Zd Zd Zed        Zej                  d        Zy)MTestSpecial.test_multiple_mixin_with_common_data_type.<locals>.LenientStrEnumc                     d| _         y )NT_valid)r   re  s     r;   r   zVTestSpecial.test_multiple_mixin_with_common_data_type.<locals>.LenientStrEnum.__init__E  s	    "r=   c                     | j                   j                  | |      }d|_        |j                         |_        ||_        || j                  |<   |S )NF)rX  r{  rE  r  r  r  r?  )ri  r`  unknowns      r;   r  zWTestSpecial.test_multiple_mixin_with_common_data_type.<locals>.LenientStrEnum._missing_G  sJ    ++33C?!&!&"'*1  'r=   c                     | j                   S r   rD  r   s    r;   validzSTestSpecial.test_multiple_mixin_with_common_data_type.<locals>.LenientStrEnum.validO  s    {{"r=   N)	rE   rF   rG   r   r  r  r.   r  rI  rK   r=   r;   LenientStrEnumrB  D  s1    #  ]]# #r=   rJ  c                       e Zd ZdZdZdZy)HTestSpecial.test_multiple_mixin_with_common_data_type.<locals>.JobStatusactivepending
terminatedN)rE   rF   rG   ACTIVEPENDING
TERMINATEDrK   r=   r;   	JobStatusrL  S  s    FG%Jr=   rS  rM  Activemissing)rY  r   r   r   rP  rQ  rR  r`  r  r   rI  r  r   )r   r@  rJ  rS  JSrU  s         r;   )test_multiple_mixin_with_common_data_typez5TestSpecial.test_multiple_mixin_with_common_data_type;  s\   	0S$ 	0	#S$ 	#	&. 	&
 i299bjj"--*PQH-(3blBII.		(Y-i299bjj"--*PQH-(3blBII.		(
7B/0'r=   c                 D    d}t        |dd      }i }i }t        |||       y )Nz8from enum import Enum; Enum('Animal', 'ANT BEE CAT DOG')z<string>exec)compilerY  )r   code	global_nslocal_lss       r;   test_empty_globalszTestSpecial.test_empty_globalsg  s.     JtZ0	T9h'r=   c                   
  G d dt               }| j                  |j                  d       | j                  t        |j                        d       | j                  dj	                  |j                        d       | j                  |j                  t        |j                               | j                  |j                  dj	                  |j                               | j                  t        |j                        d        G d d      
 G 
fdd	
t               }| j                  |j                  d
       | j                  t        |j                        d        G d dt              } G d d|t               }| j                  |j                  d       | j                  |j                  t        |j                                G d d      } G d d||t               }| j                  |j                  d       | j                  |j                  t        |j                               | j                  t        d      5   G d dt               }d d d        | j                  t        d      5   G d dt               }d d d        | j                  t        d      5   G d dt               }	d d d        | j                  t        dt        j                        5   G d dt               }	d d d        | j                  t        d       5   G d! dt               }	d d d        y # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   \xY w# 1 sw Y   y xY w)"Nc                       e Zd ZdZdZdZdZy)-TestSpecial.test_strenum.<locals>.GoodStrEnumrB  rC     3ascii   4latin1r  NrE   rF   rG   r  r  rK  fourrK   r=   r;   GoodStrEnumra  q      CC!E+Dr=   rj  rB  ri  z<GoodStrEnum.one: '1'>c                       e Zd Zd Zy)+TestSpecial.test_strenum.<locals>.DumbMixinc                      yNdon't do thisrK   r   s    r;   r  z3TestSpecial.test_strenum.<locals>.DumbMixin.__str__~      &r=   Nr  rK   r=   r;   	DumbMixinrm  }  r  r=   rr  c                   4    e Zd ZdZdZdZW  j                  Zy)-TestSpecial.test_strenum.<locals>.DumbStrEnumr|  67NrE   rF   rG   fivesixsevenr  rr  s   r;   DumbStrEnumrt        DCE''Gr=   r|  rv  rp  c                       e Zd Zd Zy)+TestSpecial.test_strenum.<locals>.EnumMixinc                      t        d|        y Nzhello from r3  r   s    r;   ra  z1TestSpecial.test_strenum.<locals>.EnumMixin.hello      01r=   Nrb  rK   r=   r;   	EnumMixinr        2r=   r  c                       e Zd ZdZy)+TestSpecial.test_strenum.<locals>.HelloEnum8NrE   rF   rG   eightrK   r=   r;   	HelloEnumr        Er=   r  r  c                       e Zd Zd Zy).TestSpecial.test_strenum.<locals>.GoodbyeMixinc                     t        d       y Nz%s wishes you a fond farewellr  r   s    r;   goodbyez6TestSpecial.test_strenum.<locals>.GoodbyeMixin.goodbye      56r=   NrE   rF   rG   r  rK   r=   r;   GoodbyeMixinr        7r=   r  c                       e Zd ZdZy)-TestSpecial.test_strenum.<locals>.GoodbyeEnum9NrE   rF   rG   ninerK   r=   r;   GoodbyeEnumr        Dr=   r  r  z1 is not a stringc                       e Zd ZdZdZy)4TestSpecial.test_strenum.<locals>.FirstFailedStrEnumrB   rC  Nr$  rK   r=   r;   FirstFailedStrEnumr    s    r=   r  z2 is not a stringc                       e Zd ZdZdZdZy)5TestSpecial.test_strenum.<locals>.SecondFailedStrEnumrB  r'   rD  Nr  rK   r=   r;   SecondFailedStrEnumr    s    r=   r  c                       e Zd ZdZdZy)4TestSpecial.test_strenum.<locals>.ThirdFailedStrEnumrB  r'   Nr$  rK   r=   r;   ThirdFailedStrEnumr    s    r=   r  zencoding must be a string, not c                   ,    e Zd ZdZdej
                  fZy)r  rB     2NrE   rF   rG   r  sysgetdefaultencodingr  rK   r=   r;   r  z4TestSpecial.test_strenum.<locals>.ThirdFailedStrEnum      C222r=   zerrors must be a string, not 9c                       e Zd ZdZdZy)r  rB  r  rd  r  Nr$  rK   r=   r;   r  z4TestSpecial.test_strenum.<locals>.ThirdFailedStrEnum      &r=   )r	   r   r  rY  r_  r  rz  r   r  r  r   r  r  r  )r   rj  r|  r  r  r  r  r  r  r  rr  s             @r;   test_strenumzTestSpecial.test_strenump  s   	,' 	,
 	#.[__-s3[__5s;#koo*>?$++koo*FGkoo.0HI	' 	'	()W 	(
 	**C0[../A	2 	2		7 	#.#ioo*>?	7 	7	,	7 	))3/))3{/?/?+@A##I/BCW  D ##I/BCg  D
 ##I/BCW  D ##IVYVlVl/op3W 3 q ##I/OP'W ' QP# DC DC
 DC qp QPs<   	L+7L7%M$MM+L47M MMM$c                     G d dt         t              } G d d|      }| j                  |j                  d       | j                  t        |j                        d       | j                  dj	                  |j                        d       | j                  t        |j                        d        G d	 d
       G fdd|      }| j                  |j                  d       | j                  t        |j                        d        G d dt              } G d d||      }| j                  |j                  d       | j                  t        |j                        d        G d d      } G d d|||      }| j                  |j                  d       | j                  t        |j                        d        G d d|      } G d d|      }	 G d d |      }
| j                  t        d!      5   G d" d |      }
d d d        | j                  t        d#      5   G d$ d |      }
d d d        y # 1 sw Y   4xY w# 1 sw Y   y xY w)%Nc                       e Zd Zy)6TestSpecial.test_custom_strenum.<locals>.CustomStrEnumNr   rK   r=   r;   CustomStrEnumr    r   r=   r  c                       e Zd ZdZdZdZdZy)1TestSpecial.test_custom_strenum.<locals>.OkayEnumrB  rC  rb  re  Nrh  rK   r=   r;   OkayEnumr    rk  r=   r  rB  zOkayEnum.oneri  z<OkayEnum.one: '1'>c                       e Zd Zd Zy)2TestSpecial.test_custom_strenum.<locals>.DumbMixinc                      yro  rK   r   s    r;   r  z:TestSpecial.test_custom_strenum.<locals>.DumbMixin.__str__  rq  r=   Nr  rK   r=   r;   rr  r    r  r=   rr  c                   4    e Zd ZdZdZdZW  j                  Zy)4TestSpecial.test_custom_strenum.<locals>.DumbStrEnumr|  ru  rv  Nrw  r{  s   r;   r|  r    r}  r=   r|  rv  rp  c                       e Zd Zd Zy)2TestSpecial.test_custom_strenum.<locals>.EnumMixinc                      t        d|        y r  r  r   s    r;   ra  z8TestSpecial.test_custom_strenum.<locals>.EnumMixin.hello  r  r=   Nrb  rK   r=   r;   r  r    r  r=   r  c                       e Zd ZdZy)2TestSpecial.test_custom_strenum.<locals>.HelloEnumr  Nr  rK   r=   r;   r  r    r  r=   r  r  zHelloEnum.eightc                       e Zd Zd Zy)5TestSpecial.test_custom_strenum.<locals>.GoodbyeMixinc                     t        d       y r  r  r   s    r;   r  z=TestSpecial.test_custom_strenum.<locals>.GoodbyeMixin.goodbye  r  r=   Nr  rK   r=   r;   r  r    r  r=   r  c                       e Zd ZdZy)4TestSpecial.test_custom_strenum.<locals>.GoodbyeEnumr  Nr  rK   r=   r;   r  r    r  r=   r  r  zGoodbyeEnum.ninec                       e Zd ZdZdZy);TestSpecial.test_custom_strenum.<locals>.FirstFailedStrEnumrB   rC  Nr$  rK   r=   r;   r  r    s    CCr=   r  c                       e Zd ZdZdZdZy)<TestSpecial.test_custom_strenum.<locals>.SecondFailedStrEnumrB  r  rD  Nr  rK   r=   r;   r  r    s    CCEr=   r  c                       e Zd ZdZdZy);TestSpecial.test_custom_strenum.<locals>.ThirdFailedStrEnumrB  r'   Nr$  rK   r=   r;   r  r    s    CCr=   r  z.encoding. must be str, not c                   ,    e Zd ZdZdej
                  fZy)r  rB  r  Nr  rK   r=   r;   r  z;TestSpecial.test_custom_strenum.<locals>.ThirdFailedStrEnum  r  r=   z.errors. must be str, not c                       e Zd ZdZdZy)r  rB  r  Nr$  rK   r=   r;   r  z;TestSpecial.test_custom_strenum.<locals>.ThirdFailedStrEnum  r  r=   )rY  r   r   r  r_  r  rz  r  r  r   r  )r   r  r  r|  r  r  r  r  r  r  r  rr  s              @r;   test_custom_strenumzTestSpecial.test_custom_strenum  s   	C 		,} 	,
 	s+X\\*N;X\\2NChll+-BC	' 	'	()] 	(
 	**C0[../A	2 	2		= 	#.Y__-/@A	7 	7	,	= 	))3/[--.0BC	 		- 		 	 ##I/MN3] 3 O ##I/KL'] ' ML	 ON MLs   6H5 I5H>I
c                     | j                  t        d      5   G d dt        t              }d d d        y # 1 sw Y   y xY w)Nz_value_ not set in __new__c                   (    e Zd Zd Zd ZdZdZdZdZy)6TestSpecial.test_missing_value_error.<locals>.Combinedc                     t         j                  | |      }d|v r'|j                  dd      \  }}|j                  d      }n|}d }||_        ||_        ||_        |S )Nr  rB   z ))rY  r{  r  stripfis_namesegmentsequence)ri  r`  r  r.   r  r  s         r;   r{  z>TestSpecial.test_missing_value_error.<locals>.Combined.__new__  s`    ;;sE2De|,1KKQ,?)'")--"5#("&$,DM#*DL$,DMKr=   c                 P    d| j                   j                  d| j                  dS )N<r>   r0  )rU  rE   r  r   s    r;   r	  z?TestSpecial.test_missing_value_error.<locals>.Combined.__repr__  s    (,(?(?MMr=   )zAn$(1,2)r   )zAn$(3,2)rB   )zAn$(5,1)r'   )zBn$rC   N)	rE   rF   rG   r{  r	  key_type
company_idr[  r  rK   r=   r;   Combinedr    s#     N !. -
 - -r=   r  )r   r  rY  r   )r   r  s     r;   test_missing_value_errorz$TestSpecial.test_missing_value_error  s.    ##I/KL.3 . MLLs   5>c                      G d dt               }| j                  |j                  d       | j                  |j                  d       y )Nc                       e Zd ZdZdZy)FTestSpecial.test_private_variable_is_normal_attribute.<locals>.PrivateRadarHoolihanN)rE   rF   rG   _Private__corporal_Private__major_rK   r=   r;   Privater    s     J!Hr=   r  r  r  )r   r   r  r  )r   r  s     r;   )test_private_variable_is_normal_attributez5TestSpecial.test_private_variable_is_normal_attribute  s<    	"d 	" 	33W=11:>r=   c                     G d dt               }|j                  j                  }| j                  ||j                         | j                  |j                  |d          | j                  |j                  j                  d       y )Nc                       e Zd ZdZdZdZy)6TestSpecial.test_member_from_member_access.<locals>.DirB   r   rC   N)rE   rF   rG   YESNOr   rK   r=   r;   Dir    s    CBDr=   r  r   )r   r  r  r  r   r   )r   r  warns      r;   test_member_from_member_accessz*TestSpecial.test_member_from_member_access
  s]    	 	 vvyydBEE"bggr&z*v.r=   c                    dddd G fddt               }| j                  t        |      |j                  |j                  g       | j                  |j                  j
                  d       | j                  |j                  j                         d       | j                  t        d      5   G fd	d
t               }d d d        y # 1 sw Y   y xY w)NalooffriendlyrO  )FOO_CATBAR_DOG	FOO_HORSEc            
           e Zd Z e       j	                  W j                         D  ci c]  \  }}|j                  d      r|| c}}}        d Zyc c}}} w )ATestSpecial.test_dynamic_members_with_static_methods.<locals>.FooFOO_c                 6    | j                   j                         S r   r`  r  r   s    r;   r  zGTestSpecial.test_dynamic_members_with_static_methods.<locals>.Foo.upper  s    zz''))r=   NrE   rF   rG   r  updaterA  
startswithr  r  rF  rG  foo_definess   000r;   r  r    sS    FMM + 1 1 3 31||F+ qD 3 
*s   Ar  rV   z$'FOO_CAT' already defined as 'aloof'c            
           e Zd Z  e       j                  W j                         D  ci c]  \  }}|j                  d      r|| c}}} fi ddi d Zyc c}}} w )DTestSpecial.test_dynamic_members_with_static_methods.<locals>.FooBarr  r  smallc                 6    | j                   j                         S r   r  r   s    r;   r  zJTestSpecial.test_dynamic_members_with_static_methods.<locals>.FooBar.upper,  s    ::++--r=   Nr  r  s   000r;   FooBarr   $  sd    $/$5$5$7$7DAq<</ 1$7 
 %g..s   Ar  )	r   r   r   r  r  r`  r  r   r  )r   r  r  r  s      @r;   (test_dynamic_members_with_static_methodsz4TestSpecial.test_dynamic_members_with_static_methods  s    ")juU	*$ 	* 	cS[[#--$@A**G4,,.6##I/UV	. 	. WVVs   0CCc                    ddl m}m  |d       G d d             } G d d|t              }| j	                  t        |j                        d	       | j                  |j                  j                   |d
      k(  |j                  j                         | j                  t        |j                  |             | j                  |j                  |u |j                         | G fdd             } G d d|t              }| j	                  t        |j                        d        G d d      } |d       G fdd|             } G d d|t              }| j	                  t        |j                        d        |d       G fdd             } G d d|t              }| j                  t        |j                        d       y)z)ensure dataclass-mixin has correct repr()r   )	dataclassfieldF)r  c                   "    e Zd ZU dZeed<   d Zy)1TestSpecial.test_repr_with_dataclass.<locals>.Foor  r   c                      y)Nzha hah!rK   r   s    r;   r	  z:TestSpecial.test_repr_with_dataclass.<locals>.Foo.__repr__9  s     r=   N)rE   rF   rG   r  __annotations__r	  rK   r=   r;   r  r	  5  s     LF!r=   r  c                       e Zd ZdZy)5TestSpecial.test_repr_with_dataclass.<locals>.EntriesrB   NrE   rF   rG   ENTRY1rK   r=   r;   Entriesr  ;      Fr=   r  z<Entries.ENTRY1: ha hah!>rB   c                   H    e Zd ZU dZeed<   eed<    W  dd      Zeed<   y	?TestSpecial.test_repr_with_dataclass.<locals>.CreatureDataMixinCreatureDataMixinsizelegsFT)r  defaulttailNrE   rF   rG   rY  r  r  r  r`  r  s   r;   r  r  D  #    .LIIE48D$8r=   r  c                       e Zd ZdZdZdZy6TestSpecial.test_repr_with_dataclass.<locals>.CreatureCreature)r  r  )mediumrS   NrE   rF   rG   BEETLEDOGrK   r=   r;   r   r  J      %L!FCr=   r   z%<Creature.DOG: size='medium', legs=4>c                       e Zd Zd Zy)1TestSpecial.test_repr_with_dataclass.<locals>.Huhc                      y)N	inheritedrK   r   s    r;   r	  z:TestSpecial.test_repr_with_dataclass.<locals>.Huh.__repr__S  s    "r=   Nr=  rK   r=   r;   r  r'  R  s    #r=   r  c                   H    e Zd ZU dZeed<   eed<    W  dd      Zeed<   yr  r  r  s   r;   r  z?TestSpecial.test_repr_with_dataclass.<locals>.CreatureDataMixinU  r  r=   c                       e Zd ZdZdZdZyr  r"  rK   r=   r;   r   z6TestSpecial.test_repr_with_dataclass.<locals>.Creature[  r%  r=   z<Creature.DOG: inherited>c                   H    e Zd ZU dZeed<   eed<    W  dd      Zeed<   yr  r  r  s   r;   r  z?TestSpecial.test_repr_with_dataclass.<locals>.CreatureDataMixinc  r  r=   c                       e Zd ZdZdZdZyr  r"  rK   r=   r;   r   z6TestSpecial.test_repr_with_dataclass.<locals>.Creaturei  r%  r=   z0<Creature.DOG: .*CreatureDataMixin object at .*>N)dataclassesr  r  r   r   r  r  r   r`  r  rX  r$  assertRegex)r   r  r  r  r  r   r  r  s          @r;   test_repr_with_dataclassz$TestSpecial.test_repr_with_dataclass/  s   
 	1			! 	! 
	!
	c4 	gnn-/JK,,A68L8LM
7>>378--4g6K6KL 
	9 	9 
	9
	 ($ 	  	hll+-TU	# 	# 
		9 	9 
	9
	 ($ 	  	hll+-HI 
		9 	9 
	9
	 ($ 	  	hll+-_`r=   c                      G d d      } G d d|t               }| j                  t        |j                        d       y )Nc                       e Zd Zd Zd Zy)2TestSpecial.test_repr_with_init_mixin.<locals>.Fooc                     || _         y r   r   )r   r   s     r;   r   z;TestSpecial.test_repr_with_init_mixin.<locals>.Foo.__init__q  s	    r=   c                 "    d| j                   dS )NzFoo(a=)r5  r   s    r;   r	  z;TestSpecial.test_repr_with_init_mixin.<locals>.Foo.__repr__s  s    z++r=   N)rE   rF   rG   r   r	  rK   r=   r;   r  r3  p  s    ,r=   r  c                       e Zd ZdZy)6TestSpecial.test_repr_with_init_mixin.<locals>.EntriesrB   Nr  rK   r=   r;   r  r9  u  r  r=   r  zFoo(a=1))r   r   r  r  r   r  r  s      r;   test_repr_with_init_mixinz%TestSpecial.test_repr_with_init_mixino  s5    	, 	,
	c4 	 	gnn-z:r=   c                      G d d      } G d d|t               }| j                  t        |j                        d       | j                  t	        |j                        d       y )Nc                       e Zd Zd Zd Zy)=TestSpecial.test_repr_and_str_with_no_init_mixin.<locals>.Fooc                      y)Nr  rK   r   s    r;   r	  zFTestSpecial.test_repr_and_str_with_no_init_mixin.<locals>.Foo.__repr__}      r=   c                      y)NooFrK   r   s    r;   r  zETestSpecial.test_repr_and_str_with_no_init_mixin.<locals>.Foo.__str__  r@  r=   N)rE   rF   rG   r	  r  rK   r=   r;   r  r>  |  s    r=   r  c                       e Zd ZdZy)ATestSpecial.test_repr_and_str_with_no_init_mixin.<locals>.EntriesrB   Nr  rK   r=   r;   r  rD    r  r=   r  rB  )r   r   r  r  rY  r:  s      r;   $test_repr_and_str_with_no_init_mixinz0TestSpecial.test_repr_and_str_with_no_init_mixinz  sN    	 	
	c4 	 	gnn-u5W^^,e4r=   c                      G d dt               }| j                  |j                  j                  d       | j                  |j                  j                  d       y )Nc                       e Zd Zd ZdZdZy)2TestSpecial.test_value_backup_assign.<locals>.Somec                 ,    t         j                  |       S r   r  r{  )ri  r  s     r;   r{  z:TestSpecial.test_value_backup_assign.<locals>.Some.__new__      ~~c**r=   rB   r'   N)rE   rF   rG   r{  r  r  rK   r=   r;   SomerH    s    +AAr=   rL  rB   r'   )r   r   r  r`  r  )r   rL  s     r;   test_value_backup_assignz$TestSpecial.test_value_backup_assign  s@    	4 	
 	q)q)r=   c                     G d dt         t              }| j                  t        |j                  |j
                  z  |      |j                  |j
                  z         | j                  t        |j                  dz  |             y )Nc                       e Zd ZdZdZdZy)7TestSpecial.test_custom_flag_bitwise.<locals>.MyIntFlagrB   r'   rS   NrE   rF   rG   r   r   FOURrK   r=   r;   	MyIntFlagrP    r  r=   rS  r'   )r  r   r   r  r   r   )r   rS  s     r;   test_custom_flag_bitwisez$TestSpecial.test_custom_flag_bitwise  s`    	T 	 	
9==9==#@)Limm^g^k^kNkl
9==1#4i@Ar=   c                     G d dt               }|j                  |j                  z  }t        j                  |      }t        j                  |      }| j                  ||       | j                  ||       |j                  |j                  z  dz  }t        j                  |      }t        j                  |      }| j                  ||       | j                  ||       | j                  |j                  d       y )Nc                       e Zd ZdZdZdZy)2TestSpecial.test_int_flags_copy.<locals>.MyIntFlagrB   r'   rS   NrQ  rK   r=   r;   rS  rW    r  r=   rS  r   r  )r   r   r   r  r  r   r`  )r   rS  flagsr  r  s        r;   test_int_flags_copyzTestSpecial.test_int_flags_copy  s    	 	
 	-5!}}U#'u%	-15!}}U#'u%y1r=   c                 ~   ddl m}  |dd       G fddt              }| j                  t	        |j
                        d       | j                  |j
                  j                   ddg              | j                  |D cg c]  }|j                   c} ddg        d	d
dg       d
dg d      g       | j                  t        t        |j
                  d        G d dt              }| j                  t	        |j
                        d       | j                  |j
                  j                   ddg              | j                  |j
                  j                  d       | j                  |j                  j                  d
       | j                  |j                  j                  g d       | j                  |D cg c]  }|j                   c} ddg        d	d
dg       d
dg d      g        G fddt              }| j                  t	        |j
                        d       | j                  |j
                  j                  d       | j                  |j                  j                  d
       | j                  |j                  j                  g d       y c c}w c c}w )Nr   r  TTuplez
id a blistc                   V    e Zd Z W  ddg       Z W  dddg      Z W  ddg d      Zy)4TestSpecial.test_namedtuple_as_value.<locals>.NTEnumr   rB   r'   rS   r   rB   r'   NrE   rF   rG   NONErL  r  r[  s   r;   NTEnumr]    s/    !Q#Dq!aS!Aq!Y'Ar=   rb  z*<NTEnum.NONE: TTuple(id=0, a=0, blist=[])>)idr   blistrB   r'   rS   r^  rc  c                   0    e Zd Zddg fZdddgfZddg dfZy)5TestSpecial.test_namedtuple_as_value.<locals>.NTCEnumr   rB   r'   rS   r^  Nr_  rK   r=   r;   NTCEnumrf    s%    a8D1qc	A1iAr=   rg  z+<NTCEnum.NONE: TTuple(id=0, a=0, blist=[])>c                   \    e Zd Zd Z W  ddg       Z W  dddg      Z W  ddg d      Zy)5TestSpecial.test_namedtuple_as_value.<locals>.NTDEnumc                 Z    t         j                  |       }||_        ||_        ||_        |S r   )r  r{  rc  r   rd  )ri  rc  r   rd  r   s        r;   r{  z=TestSpecial.test_namedtuple_as_value.<locals>.NTDEnum.__new__  s*    ,	$r=   r   rB   r'   rS   r^  N)rE   rF   rG   r{  r`  rL  r  ra  s   r;   NTDEnumri    s6     !Q#Dq!aS!Aq!Y'Ar=   rk  z+<NTDEnum.NONE: TTuple(id=0, a=0, blist=[])>)r  r  r   r   r  r`  r`  rp  rq  r[  rc  rL  r   r  rd  )r   r  rb  r  rg  rk  r[  s         @r;   test_namedtuple_as_valuez$TestSpecial.test_namedtuple_as_value  s#   *Hl3	(T 	( 	fkk*,XY**Fa1B,GH"()&Q&)1,fQqc.JFVW[\dmLno	
 	.'6;;E	 fd 	  	gll+-Z[++VqAR-HI!,a()4")*'Q'*1,fQqc.JFVW[\dmLno	
		(d 		( 	gll+-Z[!,a()4C *  +s   J5J:c                 b    G d dt               }| j                  |j                  d       | j                  |j                  d       | j                  |j                  d       | j                  |j                  dz  d        G d dt
              }| j                  |j                  d       | j                  |j                  d       | j                  |j                  j                  d       | j                  |j                  |j                  z  j                  d        G d	 dt        t
        t        
      }| j                  |j                  d       | j                  |j                  d       | j                  |j                  d       | j                  |j                  dz  d       y )Nc                   "    e Zd Zd Z ed      Zy);TestSpecial.test_flag_with_custom_new.<locals>.FlagFromCharc                 J    d|z  }t         j                  | |      }||_        |S r  r8  ri  rS  r`  r   s       r;   r{  zCTestSpecial.test_flag_with_custom_new.<locals>.FlagFromChar.__new__  '    Q{{3.$r=   r   NrE   rF   rG   r{  ordr   rK   r=   r;   FlagFromCharro         CAr=   ru  l    l                rB   l               c                   &    e Zd Zd Z ed      ZdZy)ro  c                 H    d|z  }t         j                  |       }||_        |S r  )r  r{  r  rq  s       r;   r{  zCTestSpecial.test_flag_with_custom_new.<locals>.FlagFromChar.__new__  s%    Q~~c*$r=   r   rB   N)rE   rF   rG   r{  rt  r   zrK   r=   r;   ru  z;TestSpecial.test_flag_with_custom_new.<locals>.FlagFromChar  s     CAAr=   l               c                   "    e Zd Zd Z ed      Zy)ro  c                 J    d|z  }t         j                  | |      }||_        |S r  r8  rq  s       r;   r{  zCTestSpecial.test_flag_with_custom_new.<locals>.FlagFromChar.__new__  rr  r=   r   Nrs  rK   r=   r;   ru  z;TestSpecial.test_flag_with_custom_new.<locals>.FlagFromChar  rv  r=   r   )
r   r   
_all_bits__flag_mask_r   r   r`  ry  r  r   )r   ru  s     r;   test_flag_with_custom_newz%TestSpecial.test_flag_with_custom_new  sW   	7 	 	002PQ113QR)GH)+IJ	4 	 	002PQ113QR--/MN,..7>>@^_	3t 	 	002PQ113QR)GH)+IJr=   c                 .    G d d      | j                  t              5   G d dt        j                        }d d d        | j                  t              5   G fddt        j                        }d d d        y # 1 sw Y   DxY w# 1 sw Y   y xY w)Nc                       e Zd Zd Zd Zy)-TestSpecial.test_init_exception.<locals>.Basec                 ,    t         j                  |       S r   rJ  )ri  re  s     r;   r{  z5TestSpecial.test_init_exception.<locals>.Base.__new__	  rK  r=   c                     t        d|      )NzI don't liker  )r   r  s     r;   r   z6TestSpecial.test_init_exception.<locals>.Base.__init__  s     33r=   N)rE   rF   rG   r{  r   rK   r=   r;   rM  r    s    +4r=   rM  c                       e Zd ZdZd Zy)/TestSpecial.test_init_exception.<locals>.MyEnumr   c                     || _         y r   r  r   r  s     r;   r   z8TestSpecial.test_init_exception.<locals>.MyEnum.__init__  	    DFr=   N)rE   rF   rG   rL  r   rK   r=   r;   r   r    s    r=   r   c                   "    e Zd ZdZd Z fdZy)r  r   c                     || _         y r   r  r  s     r;   r   z8TestSpecial.test_init_exception.<locals>.MyEnum.__init__  r  r=   c                 D    j                  |       } |      |_        |S r   )r{  r  )ri  r`  r   rM  s      r;   r{  z7TestSpecial.test_init_exception.<locals>.MyEnum.__new__  s!    !\\#.F%)%[FN!Mr=   N)rE   rF   rG   rL  r   r{  )rM  s   r;   r   z/TestSpecial.test_init_exception.<locals>.MyEnum  s    "r=   )rp  r  r.   r   r   )r   r   rM  s     @r;   test_init_exceptionzTestSpecial.test_init_exception  sp    	4 	4
 y)tyy  *
 z*"tyy " +* *)
 +*s   A?B?BBc                      G d dt               }| j                   |dd      |j                         | j                   |dd      |j                         y )Nc                       e Zd ZdZdZdZdZy)>TestSpecial.test_second_tuple_item_is_falsey.<locals>.Cardinal)rB   r   )r   rB   )r?   r   )r   r?   N)rE   rF   rG   RIGHTUPLEFTDOWNrK   r=   r;   Cardinalr    s    EBDDr=   r  rB   r   r?   )r   r  r  r  )r   r  s     r;    test_second_tuple_item_is_falseyz,TestSpecial.test_second_tuple_item_is_falsey  s@    	t 	
 	hq!nhnn5hr1ox}}5r=   c                     | j                  t        d      5  t        d       d d d        | j                  t        d      5  t        d       d d d        y # 1 sw Y   4xY w# 1 sw Y   y xY w)Nhas no membersr   )r   r  r   r   r   s    r;   test_no_memberszTestSpecial.test_no_members%  sc    ##  G	
 ##  G	  
 s   AA"A"A+c                 6   dg i fD ]P  }d t         fD ]C  }t        d||      }| j                  t        |      d       | j	                  t
        d|d       E R | j	                  t
        dt        dd       | j	                  t
        dt        ddt                y )	Nr%  
empty_enumr  r   r  z.int. object is not iterablebad_enum)rW  )r  r   r   r  r   r  )r   nothinge_typer  s       r;   test_empty_nameszTestSpecial.test_empty_names1  s    2rzG)!,fE
  Z!4&&y2BJPQR $ "
 	y*H$PZbcdy*H$PZ\]dghr=   N)prE   rF   rG   r   r]  rh  ro  unittestskipr}  r  r  r  r  skipIfpython_versionr  r  r  r  r  r  r  r  r  r%  r)  r.  r2  r4  r7  r:  r=  rM  rQ  rV  rj  rl  rn  rp  rs  rv  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r
  r  r  r2  r8  rY  r  r  r  r  r  r  r  r  r  r  r  r  r  r.  r<  rG  rR  re  rs  r  r  r  r  r  r  r  r  r%  r:  rW  r^  r  r  r  r  r  r  r0  r;  rE  rM  rT  rY  rl  r~  r  r  r  r  rK   r=   r;   r6  r6    s   :),&$ X]]< + !+02E
@08 X__g%+	. X__W$-	((:0.**,,,,=\$. .". .". . C6
69;57DOKA93	8,&A4
<&4??CA93$ #J:2x:2x:2x92v82t82t
>="="7(; ;4.>B-.&,E*887"D"
5#5J +De8N&6*(X(<'|9'v.4?/.6>a@	;5*B2&+5Z,K\"*6
ir=   r6  c                   :    e Zd ZdZd Zd Zd Zd Zd Zd Z	d Z
y	)
	TestOrderz%test usage of the `_order_` attributec                 "     G d dt               }y )Nc                       e Zd ZdZdZdZdZy)*TestOrder.test_same_members.<locals>.Colorred green bluerB   r'   rC   NrE   rF   rG   _order_r  r  r  rK   r=   r;   r  r  ?  s    &GCEDr=   r  r   r  s     r;   test_same_memberszTestOrder.test_same_members>  s    	D 	r=   c                 "     G d dt               }y )Nc                        e Zd ZdZdZdZdZeZy)7TestOrder.test_same_members_with_aliases.<locals>.Colorr  rB   r'   rC   NrE   rF   rG   r  r  r  r  verderK   r=   r;   r  r  F  s    &GCEDEr=   r  r  r  s     r;   test_same_members_with_aliasesz(TestOrder.test_same_members_with_aliasesE  s    	D 	r=   c                 x    | j                  t        d      5   G d dt              }d d d        y # 1 sw Y   y xY w)N#member order does not match _order_c                       e Zd ZdZdZdZdZy)6TestOrder.test_same_members_wrong_order.<locals>.Colorr  rB   rC   r'   N)rE   rF   rG   r  r  r  r  rK   r=   r;   r  r  O  s    *r=   r  r   r  r   r  s     r;   test_same_members_wrong_orderz'TestOrder.test_same_members_wrong_orderM  s,    ##I/TU  VUUrW  c                 x    | j                  t        d      5   G d dt              }d d d        y # 1 sw Y   y xY w)Nr  c                       e Zd ZdZdZdZdZy)5TestOrder.test_order_has_extra_members.<locals>.Colorred green blue purplerB   r'   rC   Nr  rK   r=   r;   r  r  W  s    1r=   r  r  r  s     r;   test_order_has_extra_membersz&TestOrder.test_order_has_extra_membersU  s,    ##I/TU  VUUrW  c                 x    | j                  t        d      5   G d dt              }d d d        y # 1 sw Y   y xY w)Nr  c                        e Zd ZdZdZdZdZeZy)BTestOrder.test_order_has_extra_members_with_aliases.<locals>.Colorr  rB   r'   rC   Nr  rK   r=   r;   r  r  _  s    1r=   r  r  r  s     r;   )test_order_has_extra_members_with_aliasesz3TestOrder.test_order_has_extra_members_with_aliases]  s,    ##I/TU  VUUrW  c                 x    | j                  t        d      5   G d dt              }d d d        y # 1 sw Y   y xY w)Nr  c                        e Zd ZdZdZdZdZdZy)4TestOrder.test_enum_has_extra_members.<locals>.Colorr  rB   r'   rC   rS   N)rE   rF   rG   r  r  r  r  purplerK   r=   r;   r  r  h  s    *r=   r  r  r  s     r;   test_enum_has_extra_membersz%TestOrder.test_enum_has_extra_membersf  s,    ##I/TU  VUUrW  c                 x    | j                  t        d      5   G d dt              }d d d        y # 1 sw Y   y xY w)Nr  c                   $    e Zd ZdZdZdZdZdZeZy)ATestOrder.test_enum_has_extra_members_with_aliases.<locals>.Colorr  rB   r'   rC   rS   N)	rE   rF   rG   r  r  r  r  r  r  rK   r=   r;   r  r  q  s     *r=   r  r  r  s     r;   (test_enum_has_extra_members_with_aliasesz2TestOrder.test_enum_has_extra_members_with_aliaseso  s,    ##I/TU  VUUrW  N)rE   rF   rG   r   r  r  r  r  r  r  r  rK   r=   r;   r  r  ;  s(    +r=   r  c                   (   e Zd ZdZ G d de      Z G d de      Z G d de      Zd Zd	 Z	d
 Z
d Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zej>                   ej@                         d               Z!d Z"y )!OldTestFlagzTests of the Flags.c                       e Zd Zd\  ZZZy)OldTestFlag.Perm)rS   r'   rB   NrE   rF   rG   RWr  rK   r=   r;   Permr  }  s    1ar=   r  c                        e Zd ZdZdZdZdZdZy)OldTestFlag.Openr   rB   r'   rC      NrE   rF   rG   ROWORWACCErK   r=   r;   Openr        r=   r  c                   J    e Zd ZdZdZdZdZdZeez  Zeez  ez  Z	eez  ez  Z
y)OldTestFlag.Colorr   rB   r'   rS   NrE   rF   rG   BLACKr  ROJOr  r  PURPLEWHITEBLANCOrK   r=   r;   r  r    >    TE	$U4r=   r  c           	         | j                   }|D ]  }|D ]  }| j                  ||z   ||j                  |j                  z               | j                  ||z  j                  |j                  |j                  z         | j                  t	        ||z        |         |D ]  }| j                  ||z  |        | j
                  }| j                  |j                  |j                  z  |j                         y r   r  r   r`  r  r  r  r  r  r   r  r  jr  s        r;   test_orzOldTestFlag.test_or  s    yyA  !a%$qww/@*AB  !a%!''0ABd1q5k40  
 AMM!a%# yydgg'1r=   c                    | j                   }|j                  |j                  z  }|j                  |j                  z  }|j                  |j                  z  }|j                  |j                  z  |j                  z  }t	        |      |||| |d      gz   }|D ]]  }|D ]V  }| j                  ||z  j                  |j                  |j                  z         | j                  t        ||z        |       X _ |D ]A  }| j                  ||z  |       | j                  ||z  |       | j                  ||z  |       C | j                  }	| j                  |	j                  |	j                  z  |	j                         y Nr   )r  r  r  r  r   r   r`  r  r  r  r  r  
r   r  r  RXWXRWXr8  r  r  r  s
             r;   test_andzOldTestFlag.test_and  s0   yyVVdff_VVdff_VVdff_fftvvo&dr2r3Q88A  !a%!''0ABd1q5k40   AMM!a%#MM!c'1%MM#'1%  yydgg'1r=   c                 >   | j                   }|D ]]  }|D ]V  }| j                  ||z  j                  |j                  |j                  z         | j                  t	        ||z        |       X _ |D ]8  }| j                  | |d      z  |       | j                   |d      |z  |       : | j
                  }| j                  |j                  |j                  z  |j                         | j                  |j                  |j                  z  |j                         y r  r  r  s        r;   test_xorzOldTestFlag.test_xor  s    yyA  !a%!''0ABd1q5k40   AMM!d1g+q)MM$q'A+q)  yydgg'1dgg'1r=   c                     | j                   }|D ]  }| j                  |        | j                  }|D ]0  }| j                  t	        |j
                        t	        |             2 y r   r  r   r  r   r`  r`  r   r  r  r  s       r;   rh  zOldTestFlag.test_bool  P    yyAOOA yyAT!'']DG4 r=   c                    | j                  t        j                  j                  t                G d dt        t
              }| j                  |j                  t
                G d dt        t              }| j                  |j                  t                G d dt        t              }| j                  |j                  t                G d d	t        t              }| j                  t        d
|d       | j                   |d      |j                  |j                  z         | j                   |d      |j                         | j                   |d      d       | j                  t         |d            t        u        | j                  t!        |      |j"                  g       | j                   |d      |j$                         | j                   |d      |j&                          G d dt        j                        }| j                  |j(                  |j*                  |j(                  z  v        | j                  t        d|d        G d dt        j,                        }| j                  |j(                  |j*                  |j(                  z  v        | j                   |d      j.                  d        G d dt              }| j                  t1        |j2                  |j4                  z        d       y )Nc                       e Zd ZdZdZdZy)'OldTestFlag.test_boundary.<locals>.IronrB   r'   r   NrE   rF   rG   r   r   EIGHTrK   r=   r;   Ironr    r  r=   r  r   c                       e Zd ZdZdZdZy)(OldTestFlag.test_boundary.<locals>.WaterrB   r'   r   Nr  rK   r=   r;   Waterr	    r  r=   r	  c                       e Zd ZdZdZdZy)(OldTestFlag.test_boundary.<locals>.SpacerB   r'   r   Nr  rK   r=   r;   Spacer	    r  r=   r	  c                       e Zd ZdZdZdZy)*OldTestFlag.test_boundary.<locals>.BizarrerC   rS   r  NrE   rF   rG   r  rS  drK   r=   r;   Bizarrer	        AAAr=   r
	  zinvalid value 7r   rC   r  c                       e Zd ZdZdZdez  Zy)+OldTestFlag.test_boundary.<locals>.SkipFlagrB   r'   rS   Nr  rK   r=   r;   SkipFlagr	        AAAAr=   r	  zSkipFlag.. invalid value 42*   c                       e Zd ZdZdZdez  Zy).OldTestFlag.test_boundary.<locals>.SkipIntFlagrB   r'   rS   Nr  rK   r=   r;   SkipIntFlagr	    r	  r=   r	  c                       e Zd ZdZdZdZdZy)-OldTestFlag.test_boundary.<locals>.MethodHint   rB   r'   r  N)rE   rF   rG   
HiddenText
DigitsOnlyLettersOnlyOnlyMaskrK   r=   r;   
MethodHintr	    s    JJKHr=   r	  z5MethodHint.HiddenText|DigitsOnly|LettersOnly|OnlyMask)r  r.   r   r  r   r   r   r   r   r   r   r   r   r   r  r  r   rS  r  r		  r?  rL  r   r`  rY  r	  r	  )r   r  r	  r	  r
	  r	  r	  r	  s           r;   test_boundaryzOldTestFlag.test_boundary  s%   dii**F3	4' 	 	doow/	D6 	 	e&&/	D5 	 	e&&.	dT 	
 	z+<eQGd1gtxx01d2h)q1%U1X#-.g4gaj')),gaj')),	tyy 	
 	

xzz(**'<=>z+H(TVW	$,, 	
 	+--*EFGR..3	 	 	Z22:3F3FFG  JA  	Br=   c                 $   | j                   }| j                  }| j                  t        |      |j                  |j
                  |j                  g       | j                  t        |      |j                  |j                  |j                  g       y r   
r  r  r   r   r  r  r  r  r  r  r   r  r  s      r;   	test_iterzOldTestFlag.test_iter  b    

yyeuyy%++uzz&JKddggtww%@Ar=   c                    t        dd      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  ||j                  |j
                  |j                  g       t        dj                               D ]  \  }}d|z  } ||      }| j                  |j                  |       | j                  t        |j                        t               | j                  |j                  |       | j                  ||       | j                  t        |      |        y Nr  R W XrC   rB   r   r   r   r  r  r  r  r,  r  r`  r  r  r   r  r  r   r  r"  r  nrG  r%  s          r;    test_programatic_function_stringz,OldTestFlag.test_programatic_function_string  s    FG$4jS3t9-TAt,tvvtvvtvv67gmmo.DAq1AQAQWWa(T!'']C0QVVQ'MM!T"MM$q'4( /r=   c                    t        ddd      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  ||j                  |j
                  |j                  g       t        dj                               D ]  \  }}d|z  } ||      }| j                  |j                  |       | j                  t        |j                        t               | j                  |j                  |       | j                  ||       | j                  t        |      |        y Nr  r%	  r   r0  rC   r&	  r'	  s          r;   +test_programatic_function_string_with_startz7OldTestFlag.test_programatic_function_string_with_start  s    FG1-4jS3t9-TAt,tvvtvvtvv67gmmo.DAq1AQAQWWa(T!'']C0QVVQ'MM!T"MM$q'4( /r=   c                    t        dg d      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  ||j                  |j
                  |j                  g       t        dj                               D ]  \  }}d|z  } ||      }| j                  |j                  |       | j                  t        |j                        t               | j                  |j                  |       | j                  ||       | j                  t        |      |        y Nr  )r  r  r  rC   r%	  rB   r&	  r'	  s          r;   %test_programatic_function_string_listz1OldTestFlag.test_programatic_function_string_list&  s    FO,4jS3t9-TAt,tvvtvvtvv67gmmo.DAq1AQAQWWa(T!'']C0QVVQ'MM!T"MM$q'4( /r=   c                    t        dd      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  ||j                  |j
                  |j                  g       t        dj                               D ]  \  }}dd|z  dz   z  } ||      }| j                  |j                  |       | j                  t        |j                        t               | j                  |j                  |       | j                  ||       | j                  t        |      |        y Nr  ))r  r'   )r  r   )r  r  rC   r%	  rB   r'   r&	  r'	  s          r;   "test_programatic_function_iterablez.OldTestFlag.test_programatic_function_iterable5  s    F;<4jS3t9-TAt,tvvtvvtvv67gmmo.DAqAaCE
AQAQWWa(T!'']C0QVVQ'MM!T"MM$q'4( /r=   c                    t        dt        d            }t        |      }| j                  t	        |      t	        |             | j                  t	        |      d|       | j                  ||j
                  |j                  |j                  g       t        dj                               D ]  \  }}dd|z  dz   z  } ||      }| j                  |j                  |       | j                  t        |j                        t               | j                  |j                  |       | j                  ||       | j                  t        |      |        y r1	  )r   r   r   r   r  r  r  r  r,  r  r`  r  r  r   r  r  r'	  s          r;   #test_programatic_function_from_dictz/OldTestFlag.test_programatic_function_from_dictD  s   FK(GHI4jS3t9-TAt,tvvtvvtvv67gmmo.DAqAaCE
AQAQWWa(T!'']C0QVVQ'MM!T"MM$q'4( /r=   c                    t        t        t              rt        t        | j                  t        j
                         t        | j                  t        j
                  t        j                  z         t        | j                  t        j
                  t        j
                   z         t        | j                  t               t        | j                  t        j                         t        | j                  t        j
                  t        j                  z         t        | j                  t        j
                         t        | j                  t        j
                  t        j                  z         t        | j                  t        j                         t        | j                  t        j                         t        | j                  t        j
                  t        j                  z         t        | j                  t        j
                         t        | j                  t        j
                  t        j                  z         t        | j                  t        j
                  t        j                  z  dz         t        | j                  t        d             t        | j                  t        d             t        | j                  t               t        | j                  t        j                         t        | j                  t        j                  dz         t        | j                  t        j
                  t        j                  z         t        | j                  t        j
                         t        | j                  t        j
                  t        j                  z         t        | j                  t        j                         t        | j                  t        j                         t        | j                  t        j                  dz         t        | j                  t        j
                  t        j                  z         y )N0   r   rB   )r  rR   r  rx   r  rI   r   rJ   rV   rX   rZ   r]   r_   r   s    r;   test_picklezOldTestFlag.test_pickleS  s   k9-dmm[->->?d..#))+//9	;d..#));+<+<*<<	>dmm[9d..@d..#))+//9	; 	dmm-@-F-FGd..+112E2I2II	Kdmm-@-G-GHd..0C0G0GHd..+112E2I2II	K 	dmm^-A-ABd..&,,^-?-??	Ad..&,,^-?-??D	Fd..q0ABd..t0DEdmm^<d..0B0BCd..0B0B10DEd..&,,^-?-??	A 	dmm-C-I-IJd...445K5O5OO	Qdmm-C-J-JKd..0F0J0JKd..0F0J0J10LMd...445K5O5OO	Qr=   c                    | j                   }| j                  }| j                  |j                  |v        | j                  |j                  |v        | j                  d|v        | j                  d|v        | j                  |j                  |v        | j                  |j                  |v        | j                  d|v        | j                  d|v        y )Nr  r  rB   )r  r  r   r  r  r   r   r  r  s      r;   r  zOldTestFlag.test_contains_tf~  s    yy

,-E)*E)*&u,-4(U
#T	"r=   c                    | j                   }|\  }}}||z  }||z  }||z  }||z  |z  }| j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        y r   )r  r   r   	r   r  r  r  r  r  r  r  r  s	            r;   test_member_containsz OldTestFlag.test_member_contains  s   yy1aUUU!eaiR R S!R R S!R R S!b!b!b!r=   c                    | j                   }| j                  t        |j                        g        | j                  t        |j                        |j
                  |j                  g       | j                  t        |j                        |j                  g       | j                  t        |j                        |j                  g       | j                  t        |j                        |j
                  |j                  |j                  g       | j                  t        |j                        |j
                  |j                  |j                  g       y r   	r  r   r   r  r  r  r  r  r  r  s     r;   test_member_iterzOldTestFlag.test_member_iter  s    

ekk*B/ell+eii-DEejj)EJJ<8ekk*U[[M:ekk*UYYUZZ,PQekk*UYYUZZ,PQr=   c                    | j                  | j                  j                  | j                  j                        d       | j                  | j                  j                  | j                  j                        d       | j                  | j                  j                  | j                  j
                        d       | j                  | j                  j                  | j                  j                        d       y Nr   rB   r'   rC   r   r  __len__r  r  r  r  r   s    r;   test_member_lengthzOldTestFlag.test_member_length      ++DJJ,<,<=qA++DJJ,<,<=qA++DJJ,=,=>B++DJJ,=,=>Br=   c                     G d dt               }| j                  t        |      |j                  |j                  |j
                  |j                  |j                  g       | j                  |j                  |j                         | j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j                  j                  d       y )Nc                   Z    e Zd ZdZ e       Z e       Z e       ZdZ e       Z	 e       Z
y)AOldTestFlag.test_number_reset_and_order_cleanup.<locals>.ConfusedzONE TWO FOUR DOS EIGHT SIXTEENr'   N)rE   rF   rG   r  r   r   r   rR  DOSr  SIXTEENrK   r=   r;   ConfusedrH	    s/    6G&C&C6DCFEfGr=   rK	  r'   r   r	  )r   r   r   r   r   rR  r  rJ	  r  rI	  r  )r   rK	  s     r;   #test_number_reset_and_order_cleanupz/OldTestFlag.test_number_reset_and_order_cleanup  s    	t 	 	Xx||X]]HNNHL\L\]	_ 	hllHLL1--q1//3))1126r=   c                    | j                   }| j                   |d      j                  d       | j                  |d   j                  d       | j                   |d      j                  d       | j                  |d   j                  d       | j                  |j                  |j
                         | j                  }| j                  |d   |j                         y NrB   r  r  r   r  r  r  r  r   r   r  r  r  r  r  r 	  s      r;   test_aliaseszOldTestFlag.test_aliases      

q.v++U3q0x--w7ellEKK0yyd4j$''*r=   c                 ~    G d dt               }| j                  t        |      |j                  |j                  |j
                  g       | j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d       y )Nc                   6    e Zd Z e       Z e       Z e       Zy)+OldTestFlag.test_auto_number.<locals>.ColorNrE   rF   rG   r   r  r  r  rK   r=   r;   r  rT	        &C6DFEr=   r  rB   r'   rS   )r   r   r   r  r  r  r`  r  s     r;   test_auto_numberzOldTestFlag.test_auto_number      	D 	
 	euyy%**ekk&JK!,))1-**A.r=   c                 x    | j                  t        d      5   G d dt              }d d d        y # 1 sw Y   y xY w)Nzinvalid flag value .not an int.c                       e Zd ZdZ e       Zy)3OldTestFlag.test_auto_number_garbage.<locals>.Colorz
not an intNrE   rF   rG   r  r   r  rK   r=   r;   r  r[	    s    "vr=   r  )r   r  r   r  s     r;   test_auto_number_garbagez$OldTestFlag.test_auto_number_garbage  s,    ##I/PQ  RQQrW  c                      G d dt               }| j                  |j                  |j                  |j                  gt        |             y )Nc                   :    e Zd Z e       xZZ e       Z e       Zy).OldTestFlag.test_duplicate_auto.<locals>.DupesNrE   rF   rG   r   r  primeror  r	  rK   r=   r;   Dupesr`	        "f$EGVFFEr=   rc	  r   r   r  r  r	  r   r   rc	  s     r;   test_duplicate_autozOldTestFlag.test_duplicate_auto  7    	D 	 	%++u||U[[A4;Or=   c                     G d d      } G d d       G d d|t               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d	       | j                  |j                  j                  d
       | j                  t        |j
                        d        G fdd|t               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d	       | j                  |j                  j                  d
       | j                  t        |j
                        d        G fdd|t               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d	       | j                  |j                  j                  d
       | j                  t        |j
                        d       y )Nc                       e Zd Zed        Zy)1OldTestFlag.test_multiple_mixin.<locals>.AllMixinc                 Z    t        |       }d }|r|d   }|dd  D ]  }||z  }	 || _        |S r=  r   r  ri  members	all_valuer   s       r;   r  z5OldTestFlag.test_multiple_mixin.<locals>.AllMixin.ALL  C    s) 	 '
I")!"+!V+	 #.#  r=   NrE   rF   rG   r   r  rK   r=   r;   AllMixinrk	        ! !r=   rs	  c                       e Zd Zd Zy)1OldTestFlag.test_multiple_mixin.<locals>.StrMixinc                 6    | j                   j                         S r   r  r   s    r;   r  z9OldTestFlag.test_multiple_mixin.<locals>.StrMixin.__str__  r  r=   Nr  rK   r=   r;   r  rv	    r  r=   r  c                   6    e Zd Z e       Z e       Z e       Zy.OldTestFlag.test_multiple_mixin.<locals>.ColorNr  rK   r=   r;   r  rz	    r   r=   r  rB   r'   rS   r   r  c                   R    e Zd Z e       Z e       Z e       ZW  j                  Zyry	  r  r  s   r;   r  z.OldTestFlag.test_multiple_mixin.<locals>.Color  r  r=   r  c                   R    e Zd Z e       Z e       Z e       ZW  j                  Zyry	  r  r  s   r;   r  z.OldTestFlag.test_multiple_mixin.<locals>.Color  r  r=   )r   r   r  r`  r  r  r  rY  r   rs	  r  r  s      @r;   r  zOldTestFlag.test_multiple_mixin  s   
	! 
	!	+ 	+	Hd 	 	!,**A.))1-!,UZZ,7	'Hh 	'
 	!,**A.))1-!,UZZ&1	'Hh 	'
 	!,**A.))1-!,UZZ&1r=   c                 b    G d dt               t               dfd}t        d      D cg c]  }t        j                  |       }}t        j                  |      5  	 d d d        | j                  d       | j                  dt              d	       y c c}w # 1 sw Y   =xY w)
Nc                       e Zd Z e       Z e       Z e       Z e       Z e       Z e       Z	 e       Z
 e       Zd Zd Zy)3OldTestFlag.test_unique_composite.<locals>.TestFlagc                 
    | |u S r   rK   r  s     r;   r  z:OldTestFlag.test_unique_composite.<locals>.TestFlag.__eq__      u}$r=   c                 ,    t        | j                        S r   hashr  r   s    r;   __hash__z<OldTestFlag.test_unique_composite.<locals>.TestFlag.__hash__  rb  r=   NrE   rF   rG   r   r  r  rK  ri  rx  ry  rz  r  r  r	  rK   r=   r;   TestFlagr	    D    &C&CFE6D6D&CFEFE%*r=   r	  Fc                  x    	 t        d      D ]  } j                   |               y # t        $ r dY y w xY wNr  Trt   addr  r  r	  r|  seens    r;   
cycle_enumz5OldTestFlag.test_unique_composite.<locals>.cycle_enum!  :    sAHHXa[) $    '+ 99r   rw   ;at least one thread failed while creating composite membersr  "too many composite members created)
r   r  rt   	threadingThreadr%   start_threadsr   r   r  r   r	  r   threadsr	  r|  r	  s       @@@r;   test_unique_compositez!OldTestFlag.test_unique_composite  s    	*t 	* u	 q!A   
3! 	  ++G4 5 	M	O 	c$i)MN 54   B 'B%%B.c                      G  fddt               } G fdd|       G d d      } G d d|      } j                  j                  d	   d        j                  |j                  d	   d        j                  |j                  d
   d        j                  |j                  j	                  d	d              j                  |j                  j	                  d
d              G d d|      } G d d|      } G d d|      } j                  |j                  d	   d        j                  |j                  j	                  d	d              j                  |j                  d
   d        j                  |j                  j	                  d	d              j                  |j                  j	                  d
d             y )Nc                   "     e Zd Z fdZ xZS ).OldTestFlag.test_init_subclass.<locals>.MyEnumc                     t        |   di | j                  | j                  j	                  dd             d| _        y )N_testFr   rK   )rz  __init_subclass__r   r  get_test1)ri  r  rU  r   s     r;   r	  z@OldTestFlag.test_init_subclass.<locals>.MyEnum.__init_subclass__6  s9    )1D1  !1!1'5!AB%
r=   rE   rF   rG   r	  r}  )rU  r   s   @r;   r   r	  5  s    & &r=   r   c                   "     e Zd Z fdZ xZS )1OldTestFlag.test_init_subclass.<locals>.TheirEnumc                 2    t        |   di | d| _        y )N	TheirEnumrK   )rz  r	  _test2)ri  r  r	  rU  s     r;   r	  zCOldTestFlag.test_init_subclass.<locals>.TheirEnum.__init_subclass__<  s    i7?$?(
r=   r	  )rU  r	  s   @r;   r	  r	  ;  s    ) )r=   r	  c                       e Zd Zd Zy)1OldTestFlag.test_init_subclass.<locals>.WhoseEnumc                      y r   rK   ri  r  s     r;   r	  zCOldTestFlag.test_init_subclass.<locals>.WhoseEnum.__init_subclass__@  rS  r=   NrE   rF   rG   r	  rK   r=   r;   	WhoseEnumr	  ?  rN  r=   r	  c                       e Zd ZdZy).OldTestFlag.test_init_subclass.<locals>.NoEnumrB   NrE   rF   rG   r   rK   r=   r;   NoEnumr	  B      Cr=   r	  r	  r	  Fc                       e Zd Zd Zy)/OldTestFlag.test_init_subclass.<locals>.OurEnumc                     d| _         y )NOurEnum)r	  r	  s     r;   r	  zAOldTestFlag.test_init_subclass.<locals>.OurEnum.__init_subclass__K  s	    &
r=   Nr	  rK   r=   r;   r	  r	  J  r  r=   r	  c                       e Zd Zd Zy)1OldTestFlag.test_init_subclass.<locals>.WhereEnumc                      y r   rK   r	  s     r;   r	  zCOldTestFlag.test_init_subclass.<locals>.WhereEnum.__init_subclass__N  rS  r=   Nr	  rK   r=   r;   	WhereEnumr	  M  rN  r=   r	  c                       e Zd ZdZy)1OldTestFlag.test_init_subclass.<locals>.NeverEnumrB   Nr	  rK   r=   r;   	NeverEnumr	  P  r	  r=   r	  )r   r   r  r   r	  )r   r   r	  r	  r	  r	  r	  r	  s   `      @r;   test_init_subclasszOldTestFlag.test_init_subclass4  s   	&T 	&	) 	)		 		Y 	++H5x@++H5x@++H5{C,,Xu=>,,Xu=>	'f 	'	 			 	))(3X>++//%@A++H5yA++//%@A++//%@Ar=   N)#rE   rF   rG   r   r   r  r  r  r  r  r  rh  r	  r!	  r)	  r,	  r/	  r2	  r4	  r7	  r  r<	  r?	  rD	  rL	  rP	  rW	  r]	  rg	  r  r%   reap_threadsrequires_working_threadingr	  r	  rK   r=   r;   r  r  z  s    t t    
22$25;B|B))))))QV
#"(RC7"+	/P+2Z ""0002#O 3 ##OJ"Br=   r  c                   J   e Zd ZdZ G d de      Z G d de      Z G d de      Z G d d	e      Zd
 Z	d Z
d Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd  Zd! Z d" Z!e"jF                   e"jH                         d#               Z%y$)%OldTestIntFlagzTests of the IntFlags.c                       e Zd ZdZdZdZy)OldTestIntFlag.PermrS   r'   rB   Nr  rK   r=   r;   r  r	  \  s    r=   r  c                        e Zd ZdZdZdZdZdZy)OldTestIntFlag.Openr   rB   r'   rC   r  Nr  rK   r=   r;   r  r	  a  r  r=   r  c                   J    e Zd ZdZdZdZdZdZeez  Zeez  ez  Z	eez  ez  Z
y)OldTestIntFlag.Colorr   rB   r'   rS   Nr  rK   r=   r;   r  r	  h  r  r=   r  c                       e Zd ZdZdZdZy)OldTestIntFlag.SkiprB   r'   r   N)rE   rF   rG   rc  SECONDEIGHTHrK   r=   r;   Skipr	  r  s    r=   r	  c                    | j                   }| j                  |j                  t        u        | j                  }|D ]9  }| j                  t        ||             | j                  ||j                         ; | j                  t        |j                  |j                  z  |             | j                  |j                  |j                  z  d       |D ]9  }| j                  t        ||             | j                  ||j                         ; | j                  t        |j                  |j                  z  |             | j                  |j                  |j                  z  d       y NrC   )r  r   rX  r  r  r  r   r`  r  r  r  r  )r   r  r  r  s       r;   	test_typezOldTestIntFlag.test_typew  s	   yy**c12yyAOOJq$/0Q(  	
466DFF?D9:$&&!,AOOJq$/0Q(  	
477TWW#4d;<477*A.r=   c                    | j                  t        t        d            dt        z         | j                  t        t        d            ddt        iz         | j                  t        t        d            ddt        iz         y )Nr   z%s.OFF_Kr  z%(m)s.LOW_BEAM_K|%(m)s.FOG_K|8r  r   z%(m)s.HeadlightsK(8))r   r  r   SHORT_MODULEr   s    r;   test_global_repr_keepz$OldTestIntFlag.test_global_repr_keep  sy    [^$\)	 	[!3450C3FF	 	[&'&#|)<<	r=   c                    | j                  t        t        d            dt        z         | j                  t        t        d            ddt        iz         | j                  t        t        d            ddt        iz         y )Nr   z%s.OFF_Cr  z%(m)s.LOW_BEAM_C|%(m)s.FOG_Cr  r   z%(m)s.OFF_C)r   r  r   r	  r   s    r;   test_global_repr_conform1z(OldTestIntFlag.test_global_repr_conform1  sy    [^$\)	 	[!345.#|1DD	 	[&'l 33	r=   c                 Z   | j                  t        t        j                        d       | j                  t        t        d            d       | j                  t	        t        j                  t        j
                  z        d       | j                  t	        t        d            d       y )Nztest_enum.ONEr   ztest_enum.NoName(0)z	NoName(0))r   r  r   r   rY  r   r   s    r;   test_global_enum_strz#OldTestIntFlag.test_global_enum_str  sn    fjj)?;fQi*?@VZZ&**45{CVAY5r=   c                    | j                   }| j                  t        |j                  d      d       | j                  t        |j                  |j                  z  d      d        G d dt
              }| j                  t        |j                  d      d       | j                  t        |j                  |j                  z  d      d       y )Nr%  4r|  c                       e Zd ZdZdZdZd Zy)+OldTestIntFlag.test_format.<locals>.NewPermrS   r'   rB   c                     | j                   S r   r  r   s    r;   r  z3OldTestIntFlag.test_format.<locals>.NewPerm.__str__  s    {{"r=   N)rE   rF   rG   r  r  r  r  rK   r=   r;   NewPermr	    s    AAA#r=   r	  r  zR|X)r  r   r_  r  r  r   )r   r  r	  s      r;   r^  zOldTestIntFlag.test_format  s    yy+S14c:	#g 	# 			2.4		DFF 2B7?r=   c                    | j                   }|D ]r  }|D ]  }| j                  ||z  |j                  |j                  z         | j                  ||z  j                  |j                  |j                  z         | j                  t	        ||z        |        t        d      D ]  }| j                  ||z  |j                  |z         | j                  ||z  j                  |j                  |z         | j                  t	        ||z        |       | j                  ||z  ||j                  z         | j                  ||z  j                  ||j                  z         | j                  t	        ||z        |        u |D ]A  }| j                  ||z  |       | j                  |dz  |       | j                  d|z  |       C | j                  }| j                  |j                  |j                  z  |j                         y Nr   r   	r  r   r`  r  r  rt   r  r  r  r  s        r;   r  zOldTestIntFlag.test_or  s   yyA  Q!''(9:  !a%!''0ABd1q5k40  1X  Q!4  !a%!<d1q5k40  QAGG4  !a%AGG<d1q5k40   AMM!a%#MM!a%#MM!a%#  yydgg'1r=   c           
      T   | j                   }|j                  |j                  z  }|j                  |j                  z  }|j                  |j                  z  }|j                  |j                  z  |j                  z  }t	        |      |||| |d      gz   }|D ]  }|D ]  }| j                  ||z  |j                  |j                  z  d|d|       | j                  ||z  j                  |j                  |j                  z  d|d|       | j                  t        ||z        |d|d|        t        d      D ]  }| j                  ||z  |j                  |z         | j                  ||z  j                  |j                  |z         | j                  t        ||z        |       | j                  ||z  ||j                  z         | j                  ||z  j                  ||j                  z         | j                  t        ||z        |         |D ]A  }| j                  ||z  |       | j                  |dz  |       | j                  d|z  |       C | j                  }	| j                  |	j                  |	j                  z  |	j                         y )Nr   zi is z, j is r   r   )r  r  r  r  r   r   r`  r  r  rt   r  r  r  r  s
             r;   r  zOldTestIntFlag.test_and  s   yyVVdff_VVdff_VVdff_fftvvo&dr2r3Q88A  Q!''(9QRTU;VW  !a%!''0AYZ\]C^_d1q5k4q!1LM  1X  Q!4  !a%!<d1q5k40  QAGG4  !a%AGG<d1q5k40   AMM!a%#MM!a%#MM!a%#  yydgg'1r=   c                 R   | j                   }|D ]r  }|D ]  }| j                  ||z  |j                  |j                  z         | j                  ||z  j                  |j                  |j                  z         | j                  t	        ||z        |        t        d      D ]  }| j                  ||z  |j                  |z         | j                  ||z  j                  |j                  |z         | j                  t	        ||z        |       | j                  ||z  ||j                  z         | j                  ||z  j                  ||j                  z         | j                  t	        ||z        |        u |D ],  }| j                  |dz  |       | j                  d|z  |       . | j                  }| j                  |j                  |j                  z  |j                         | j                  |j                  |j                  z  |j                         y r	  r	  r  s        r;   r  zOldTestIntFlag.test_xor  s   yyA  Q!''(9:  !a%!''0ABd1q5k40  1X  Q!4  !a%!<d1q5k40  QAGG4  !a%AGG<d1q5k40   AMM!a%#MM!a%#  yydgg'1dgg'1r=   c                    | j                   }|j                  |j                  z  }|j                  |j                  z  }|j                  |j                  z  }|j                  |j                  z  |j                  z  }t	        |      |||| |d      gz   }|D ]P  }| j                  | | j                         | j                  t        |       |       | j                  |  |       R |D ]  }| j                  |  |        | j                  }| j                  |j                  |j                   z  |j                         | j                  |j                  |j                  z  |j                   z  |j                         y r  )r  r  r  r  r   r   r`  r  r  r  r  r  r  )	r   r  r  r  r  r  r8  r  r  s	            r;   test_invertzOldTestIntFlag.test_invert  s0   yyVVdff_VVdff_VVdff_fftvvo&dr2r3Q88AaR1",MM$r(D)qbS!$  AMMA2#q! yydgg($''2twwtww477(2DGG<r=   c                    | j                  t        j                  j                  t                G d dt        t              } G d dt        t
              }| j                  |j                  t
                G d dt        t              }| j                  |j                  t                G d d	t        t              }| j                  |j                  t                G d
 dt        t              }| j                  t        d|d       | j                   |d      |j                  |j                  z         | j                   |d      |j                         | j                   |d      d       | j                  t         |d            t        u        | j                  t!        |      |j"                  g       | j                   |d      |j$                         | j                   |d      |j&                         |j(                  |j                  z  }| j                  |d       | j+                  ||       | j                  t-        |      d       | j                  t/        |      d       y )Nc                       e Zd ZdZy),OldTestIntFlag.test_boundary.<locals>.SimplerB   N)rE   rF   rG   SINGLErK   r=   r;   Simpler	    r  r=   r	  r   c                       e Zd ZdZdZdZy)*OldTestIntFlag.test_boundary.<locals>.IronrB   r'   r   Nr  rK   r=   r;   r  r	    r  r=   r  c                       e Zd ZdZdZdZy)+OldTestIntFlag.test_boundary.<locals>.WaterrB   r'   r   Nr  rK   r=   r;   r	  r	    r  r=   r	  c                       e Zd ZdZdZdZy)+OldTestIntFlag.test_boundary.<locals>.SpacerB   r'   r   Nr  rK   r=   r;   r	  r	    r  r=   r	  c                       e Zd ZdZdZdZy)-OldTestIntFlag.test_boundary.<locals>.BizarrerC   rS   r  Nr	  rK   r=   r;   r
	  r	  "  r	  r=   r
	  zinvalid value 5rE  r   r	  rC   r  z <Simple.SINGLE|<Iron.TWO: 2>: 3>rD  )r  r.   r   r  r   r   r   r   r   r   r   r   r   r   r  r  r   rS  r  r		  r	  r  r  rY  )r   r	  r  r	  r	  r
	  simples          r;   r	  zOldTestIntFlag.test_boundary  s   dll--t4	Wt 		7V 	 	doov.	Gg 	 	e&&0	Ge 	 	e&&.	g 	
 	z+<dAFeAh		%)) 34eBi+q1%U1X#-.g4gaj')),gaj')),)#ff-f'IJVc*r=   c                 $   | j                   }| j                  }| j                  t        |      |j                  |j
                  |j                  g       | j                  t        |      |j                  |j                  |j                  g       y r   r	  r 	  s      r;   r!	  zOldTestIntFlag.test_iter9  r"	  r=   c                    t        dd      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  ||j                  |j
                  |j                  g       t        dj                               D ]  \  }}d|z  } ||      }| j                  |j                  |       | j                  t        |j                        t               | j                  ||       | j                  |j                  |       | j                  ||       | j                  t        |      |        y r$	  r   r   r   r  r  r  r  r,  r  r`  r  r  r   r  r  r'	  s          r;   r)	  z/OldTestIntFlag.test_programatic_function_string?  s   vw'4jS3t9-TAt,tvvtvvtvv67gmmo.DAq1AQAQWWa(T!'']C0Q"QVVQ'MM!T"MM$q'4( /r=   c                    t        ddd      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  ||j                  |j
                  |j                  g       t        dj                               D ]  \  }}d|z  } ||      }| j                  |j                  |       | j                  t        |j                        t               | j                  ||       | j                  |j                  |       | j                  ||       | j                  t        |      |        y r+	  r	  r'	  s          r;   r,	  z:OldTestIntFlag.test_programatic_function_string_with_startO  s   vwa04jS3t9-TAt,tvvtvvtvv67gmmo.DAq1AQAQWWa(T!'']C0Q"QVVQ'MM!T"MM$q'4( /r=   c                    t        dg d      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  ||j                  |j
                  |j                  g       t        dj                               D ]  \  }}d|z  } ||      }| j                  |j                  |       | j                  t        |j                        t               | j                  ||       | j                  |j                  |       | j                  ||       | j                  t        |      |        y r.	  r	  r'	  s          r;   r/	  z4OldTestIntFlag.test_programatic_function_string_list_  s   v/4jS3t9-TAt,tvvtvvtvv67gmmo.DAq1AQAQWWa(T!'']C0Q"QVVQ'MM!T"MM$q'4( /r=   c                    t        dd      }t        |      }| j                  t        |      t        |             | j                  t        |      d|       | j                  ||j                  |j
                  |j                  g       t        dj                               D ]  \  }}dd|z  dz   z  } ||      }| j                  |j                  |       | j                  t        |j                        t               | j                  ||       | j                  |j                  |       | j                  ||       | j                  t        |      |        y r1	  r	  r'	  s          r;   r2	  z1OldTestIntFlag.test_programatic_function_iterableo  s   v>?4jS3t9-TAt,tvvtvvtvv67gmmo.DAqAaCE
AQAQWWa(T!'']C0Q"QVVQ'MM!T"MM$q'4( /r=   c                    t        dt        d            }t        |      }| j                  t	        |      t	        |             | j                  t	        |      d|       | j                  ||j
                  |j                  |j                  g       t        dj                               D ]  \  }}dd|z  dz   z  } ||      }| j                  |j                  |       | j                  t        |j                        t               | j                  ||       | j                  |j                  |       | j                  ||       | j                  t        |      |        y r1	  )r   r   r   r   r  r  r  r  r,  r  r`  r  r  r   r  r  r'	  s          r;   r4	  z2OldTestIntFlag.test_programatic_function_from_dict  s   v{+JKL4jS3t9-TAt,tvvtvvtvv67gmmo.DAqAaCE
AQAQWWa(T!'']C0Q"QVVQ'MM!T"MM$q'4( /r=   c                    t        j                  dg       }t        |      }| j                  t	        |      t	        |             | j                  t	        |      d|       t        j
                  dg       }t        |      }| j                  t	        |      t	        |             | j                  t	        |      d|       y )Nr  r   Thingr.   r   r   r   r  r   r   r  r"  r	  s       r;   )test_programatic_function_from_empty_listz8OldTestIntFlag.test_programatic_function_from_empty_list  s    ||FB'4jS3t9-TAt,		'2&5kS3u:.UQ.r=   c                 r   t        j                  dd      }t        |      }| j                  t	        |      t	        |             | j                  t	        |      d|       t        j
                  dd      }| j                  t	        |      t	        |             | j                  t	        |      d|       y )Nr  rK   r   r	  r	  r 
  s       r;   *test_programatic_function_from_empty_tuplez9OldTestIntFlag.test_programatic_function_from_empty_tuple  s    ||FB'4jS3t9-TAt,		'2&S3u:.UQ.r=   c                 @   | j                   }| j                  }| j                  |j                  |v        | j                  |j                  |v        | j                  d|v        | j                  d|v        | j                  d|v        | j                  d|v        y )Nr  r  r'   )r  r  r   r  r  r   r9	  s      r;   r  zOldTestIntFlag.test_contains_tf  s    yy

u,-4(E)*&U
#T	"r=   c                    | j                   }|\  }}}||z  }||z  }||z  }||z  |z  }| j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  ||v        | j                  t              5  | j                  d|v        d d d        y # 1 sw Y   y xY w)Nr  )r  r   r   rp  r  r;	  s	            r;   r<	  z#OldTestIntFlag.test_member_contains  s0   yy1aUUU!eaiR R S!R R S!R R S!b!b!b!y)Vr\* *))s   #E  E	c                 (   | j                   }| j                  t        |j                        g        | j                  t        |j                        |j
                  |j                  g       | j                  t        |j                        |j                  g       | j                  t        |j                        |j                  g       | j                  t        |j                        |j
                  |j                  |j                  g       y r   r>	  r  s     r;   r?	  zOldTestIntFlag.test_member_iter  s    

ekk*B/ell+eii-DEejj)EJJ<8ekk*U[[M:ekk*UYYUZZ,PQr=   c                    | j                  | j                  j                  | j                  j                        d       | j                  | j                  j                  | j                  j                        d       | j                  | j                  j                  | j                  j
                        d       | j                  | j                  j                  | j                  j                        d       y rA	  rB	  r   s    r;   rD	  z!OldTestIntFlag.test_member_length  rE	  r=   c                    | j                   }| j                   |d      j                  d       | j                  |d   j                  d       | j                   |d      j                  d       | j                  |d   j                  d       | j                  |j                  |j
                         | j                  }| j                  |d   |j                         y rN	  rO	  r 	  s      r;   rP	  zOldTestIntFlag.test_aliases  rQ	  r=   c                     | j                   }|D ]  }| j                  |        | j                  }|D ]0  }| j                  t	        |j
                        t	        |             2 y r   r  r  s       r;   rh  zOldTestIntFlag.test_bool  r  r=   c                     G d d      } G d d       G d d|t               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d	       | j                  |j                  j                  d
       | j                  t        |j
                        d        G fdd|t               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d	       | j                  |j                  j                  d
       | j                  t        |j
                        d        G fdd|t               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d	       | j                  |j                  j                  d
       | j                  t        |j
                        d       y )Nc                       e Zd Zed        Zy)4OldTestIntFlag.test_multiple_mixin.<locals>.AllMixinc                 Z    t        |       }d }|r|d   }|dd  D ]  }||z  }	 || _        |S r=  rm	  rn	  s       r;   r  z8OldTestIntFlag.test_multiple_mixin.<locals>.AllMixin.ALL  rq	  r=   Nrr	  rK   r=   r;   rs	  r
    rt	  r=   rs	  c                       e Zd Zd Zy)4OldTestIntFlag.test_multiple_mixin.<locals>.StrMixinc                 6    | j                   j                         S r   r  r   s    r;   r  z<OldTestIntFlag.test_multiple_mixin.<locals>.StrMixin.__str__  r  r=   Nr  rK   r=   r;   r  r
    r  r=   r  c                   6    e Zd Z e       Z e       Z e       Zy1OldTestIntFlag.test_multiple_mixin.<locals>.ColorNr  rK   r=   r;   r  r
    r   r=   r  rB   r'   rS   r   r	  c                   R    e Zd Z e       Z e       Z e       ZW  j                  Zyr
  r  r  s   r;   r  z1OldTestIntFlag.test_multiple_mixin.<locals>.Color  r  r=   r  c                   R    e Zd Z e       Z e       Z e       ZW  j                  Zyr
  r  r  s   r;   r  z1OldTestIntFlag.test_multiple_mixin.<locals>.Color  r  r=   )r   r   r  r`  r  r  r  rY  r}	  s      @r;   r  z"OldTestIntFlag.test_multiple_mixin  s   
	! 
	!	+ 	+	Hg 	 	!,**A.))1-!,UZZ#.	'Hh 	'
 	!,**A.))1-!,UZZ&1	'Hh 	'
 	!,**A.))1-!,UZZ&1r=   c                 b    G d dt               t               dfd}t        d      D cg c]  }t        j                  |       }}t        j                  |      5  	 d d d        | j                  d       | j                  dt              d	       y c c}w # 1 sw Y   =xY w)
Nc                       e Zd Z e       Z e       Z e       Z e       Z e       Z e       Z	 e       Z
 e       Zd Zd Zy)6OldTestIntFlag.test_unique_composite.<locals>.TestFlagc                 
    | |u S r   rK   r  s     r;   r  z=OldTestIntFlag.test_unique_composite.<locals>.TestFlag.__eq__  r	  r=   c                 ,    t        | j                        S r   r	  r   s    r;   r	  z?OldTestIntFlag.test_unique_composite.<locals>.TestFlag.__hash__!  rb  r=   Nr	  rK   r=   r;   r	  r
    r	  r=   r	  Fc                  x    	 t        d      D ]  } j                   |               y # t        $ r dY y w xY wr	  r	  r	  s    r;   r	  z8OldTestIntFlag.test_unique_composite.<locals>.cycle_enum&  r	  r	  r   r	  r	  r  r	  )
r   r  rt   r	  r	  r%   r	  r   r   r  r	  s       @@@r;   r	  z$OldTestIntFlag.test_unique_composite  s    	*w 	* u	 q!A   
3! 	  ++G4 5 	M	O 	c$i)MN 54r	  N)&rE   rF   rG   r   r   r  r  r  r	  r	  r	  r	  r	  r^  r  r  r  r	  r	  r!	  r)	  r,	  r/	  r2	  r4	  r
  r
  r  r<	  r?	  rD	  rP	  rh  r  r%   r	  r	  r	  rK   r=   r;   r	  r	  Y  s     w 
w    w 
/6@2*242*=",+\B) ) ) ) )"//#+,RC+5+2Z ""0002#O 3 ##Or=   r	  c                       e Zd Zd Zd Zd Zy)TestEmptyAndNonLatinStringsc                 p    | j                  t              5  t        dd      }d d d        y # 1 sw Y   y xY w)N	empty_abc)r%  r  r?  )rp  r   r   )r   r
  s     r;   test_empty_stringz-TestEmptyAndNonLatinStrings.test_empty_string<  s(    z*[.9I +**s   ,5c                 l    t        dd      }t        |d      }| j                  |j                  d       y )N	greek_abc)   αr  r?  r#
  rB   r   r[  r   r`  )r   r"
  r
  s      r;   test_non_latin_character_stringz;TestEmptyAndNonLatinStrings.test_non_latin_character_string@  s/    &:;	y(+Q'r=   c                 l    t        dd      }t        |d      }| j                  |j                  d       y )N
hebrew_123)   אrC  rD  r(
  rB   r$
  )r   r'
  r
  s      r;   test_non_latin_number_stringz8TestEmptyAndNonLatinStrings.test_non_latin_number_stringE  s/    ,(<=
z8,Q'r=   N)rE   rF   rG   r 
  r%
  r)
  rK   r=   r;   r
  r
  :  s    :(
(r=   r
  c                       e Zd Zd Zd Zd Zy)
TestUniquec                 d    t          G d dt                     }t          G d dt                     }y )Nc                       e Zd ZdZdZdZy)+TestUnique.test_unique_clean.<locals>.CleanrB   r        @NrE   rF   rG   r  r  r  rK   r=   r;   Cleanr.
  N      CCDr=   r1
  c                       e Zd ZdZdZdZy)-TestUnique.test_unique_clean.<locals>.CleanerrB   r'   rC   NrE   rF   rG   singledoubletriplerK   r=   r;   Cleanerr4
  T      FFFr=   r9
  )r   r   r   r   r1
  r9
  s      r;   test_unique_cleanzTestUnique.test_unique_cleanM  s6    		D 	 
	
 
	g 	 
	r=   c                    | j                  t        d      5  t         G d dt                     }d d d        | j                  t        d      5  t         G d dt                     }d d d        y # 1 sw Y   AxY w# 1 sw Y   y xY w)N	tres.*onec                       e Zd ZdZdZdZy)+TestUnique.test_unique_dirty.<locals>.DirtyrB   r  Nr0
  rK   r=   r;   Dirtyr@
  \      r=   rA
  double.*single.*turkey.*triplec                       e Zd ZdZdZdZdZy)-TestUnique.test_unique_dirty.<locals>.DirtierrB   rC   NrE   rF   rG   r6
  r7
  r8
  turkeyrK   r=   r;   DirtierrE
  e      r=   rH
  )r   r   r   r   r   r   rA
  rH
  s      r;   test_unique_dirtyzTestUnique.test_unique_dirtyZ  s    ##J<   = ##0 '    =< s   A0A<0A9<Bc                     t        t               G d dt                     }t        t               G d dt                     }y )Nc                       e Zd ZdZdZdZy)/TestUnique.test_unique_with_name.<locals>.SillyrB   r  rC   NrE   rF   rG   r  r  r   rK   r=   r;   SillyrN
  m      CCDr=   rP
  c                       e Zd ZdZdZdZdZy)1TestUnique.test_unique_with_name.<locals>.SillierrB   r'   rC   rS   NrE   rF   rG   r6
  r   r8
  r`  rK   r=   r;   SillierrS
  s      FDFEr=   rU
  r   r   r   r   r   rP
  rU
  s      r;   test_unique_with_namez TestUnique.test_unique_with_namel  >    		D 	 
	
 
	g 	 
	r=   N)rE   rF   rG   r<
  rK
  rY
  rK   r=   r;   r+
  r+
  K  s    $r=   r+
  c                   0    e Zd Zd Zd Zd Zd Zd Zd Zy)
TestVerifyc                 P   t        t               G d dt                     }t        t               G d dt                     }| j                  t        d      5  t        t               G d dt                     }d d d        | j                  t        d      5  t        t               G d	 d
t
                     }d d d        | j                  t        d      5  t        t               G d dt
                     }d d d        y # 1 sw Y   xY w# 1 sw Y   VxY w# 1 sw Y   y xY w)Nc                   D    e Zd Z e       Z e       Z e       Z e       Zy)(TestVerify.test_continuous.<locals>.AutoN)rE   rF   rG   r   rc  r	  THIRDFORTHrK   r=   r;   Autor_
  }  s    FEVFFEFEr=   rb
  c                       e Zd ZdZdZdZdZy)*TestVerify.test_continuous.<locals>.ManualrC   rS   rE  r  NrE   rF   rG   rc  r	  r`
  ra
  rK   r=   r;   Manualrd
    s    EFEEr=   rf
  z<invalid enum .Missing.: missing values 5, 6, 7, 8, 9, 10, 12c                       e Zd ZdZdZdZdZy)+TestVerify.test_continuous.<locals>.MissingrC   rS   r  r  Nre
  rK   r=   r;   Missingrh
        r=   ri
  z,invalid flag .Incomplete.: missing values 32c                       e Zd ZdZdZdZdZy).TestVerify.test_continuous.<locals>.IncompleterS   r   r	  @   Nre
  rK   r=   r;   
Incompleterl
    rj
  r=   rn
  z1invalid flag .StillIncomplete.: missing values 16c                       e Zd ZdZdZdZdZy)3TestVerify.test_continuous.<locals>.StillIncompleterS   r   r  r  Nre
  rK   r=   r;   StillIncompleterp
    rj
  r=   rq
  )r   r   r   r   r   r   )r   rb
  rf
  ri
  rn
  rq
  s         r;   test_continuouszTestVerify.test_continuous|  s   	
		4 	 
	 

		T 	 
	 ##J0noJ$    p ##J0^_JT    ` ##J0cdJ$    ed! po `_ eds$   "D"D"DDDD%c                 l    G d dt               }| j                  t        |      |j                  g       | j                  |j                  j
                  d       | j                  |j                  j
                  d       | j                  |j                  j
                  d       | j                  t        d      5  t        t               G d dt                      }d d d        | j                  t        j                  d      dd	g        G d
 dt              }| j                  t        |      |j                  g       | j                  |j                  j
                  d       | j                  |j                  j
                  d       | j                  |j                  j
                  d       | j                  t        d      5  t        t               G d dt                     }d d d        | j                  t        j                  d	      d	g       y # 1 sw Y   ?xY w# 1 sw Y   =xY w)Nc                       e Zd ZdZdZdZy*TestVerify.test_composite.<locals>.BizarrerC   rS   r  Nr	  rK   r=   r;   r
	  rv
    r	  r=   r
	  rC   rS   r  zyinvalid Flag 'Bizarre': aliases b and d are missing combined values of 0x3 .use enum.show_flag_values.value. for details.c                       e Zd ZdZdZdZyru
  r	  rK   r=   r;   r
	  z*TestVerify.test_composite.<locals>.Bizarre  s    r=   rB   r'   c                       e Zd ZdZdZdZyru
  r	  rK   r=   r;   r
	  z*TestVerify.test_composite.<locals>.Bizarre  r	  r=   zcinvalid Flag 'Bizarre': alias d is missing value 0x2 .use enum.show_flag_values.value. for details.c                       e Zd ZdZdZy)rv
  rS   r  N)rE   rF   rG   rS  r		  rK   r=   r;   r
	  z*TestVerify.test_composite.<locals>.Bizarre  s    r=   )r   r   r   rS  r  r`  r		  r   r   r   r   r.   show_flag_valuesr   )r   r
	  s     r;   test_compositezTestVerify.test_composite  s   	d 	 	g4!,!,!,## L K $  ! 	..q1Aq6:	g 	 	g4!,!,!,##u K '  ! 	..q1A377 & s   >"H"H*H'*H3c                     t        t               G d dt                     }t        t               G d dt                     }y )Nc                       e Zd ZdZdZdZy)+TestVerify.test_unique_clean.<locals>.CleanrB   r  r/
  Nr0
  rK   r=   r;   r1
  r~
    r2
  r=   r1
  c                       e Zd ZdZdZdZy)-TestVerify.test_unique_clean.<locals>.CleanerrB   r'   rC   Nr5
  rK   r=   r;   r9
  r
    r:
  r=   r9
  rW
  r;
  s      r;   r<
  zTestVerify.test_unique_clean  s>    		D 	 
	
 
	g 	 
	r=   c                 4   | j                  t        d      5  t        t               G d dt                     }d d d        | j                  t        d      5  t        t               G d dt
                     }d d d        y # 1 sw Y   JxY w# 1 sw Y   y xY w)Nr>
  c                       e Zd ZdZdZdZy)+TestVerify.test_unique_dirty.<locals>.DirtyrB   r  Nr0
  rK   r=   r;   rA
  r
    rB
  r=   rA
  rC
  c                       e Zd ZdZdZdZdZy)-TestVerify.test_unique_dirty.<locals>.DirtierrB   rC   NrF
  rK   r=   r;   rH
  r
    rI
  r=   rH
  )r   r   r   r   r   r   rJ
  s      r;   rK
  zTestVerify.test_unique_dirty  s    ##J<F^   = ##0 F^'    =< s   "B"BBBc                     t        t               G d dt                     }t        t               G d dt                     }y )Nc                       e Zd ZdZdZdZy)/TestVerify.test_unique_with_name.<locals>.SillyrB   r  rC   NrO
  rK   r=   r;   rP
  r
    rQ
  r=   rP
  c                       e Zd ZdZdZdZdZy)1TestVerify.test_unique_with_name.<locals>.SillierrB   r'   rC   rS   NrT
  rK   r=   r;   rU
  r
    rV
  r=   rU
  rW
  rX
  s      r;   rY
  z TestVerify.test_unique_with_name  rZ
  r=   c                 F    t        t               G d dt                     }y )Nc                       e Zd ZdZdZdZdZy)-TestVerify.test_negative_alias.<locals>.ColorrB   r'   rS   r?   N)rE   rF   rG   r  r  r  r  rK   r=   r;   r  r
    s    CEDEr=   r  )r   r   r   r  s     r;   test_negative_aliaszTestVerify.test_negative_alias  s     			D 	 
	r=   N)	rE   rF   rG   rr
  r{
  r<
  rK
  rY
  r
  rK   r=   r;   r\
  r\
  z  s"    %P$8L$r=   r\
  c                   t   e Zd ZdZdZdZdZdZd Zd Z	d Z
d	 Zd
 Zd Z ej                  edk\  d      d        Z ej                  edk\  d      d        Z ej                  edk  d      d        Z ej                  edk  d      d        Zd Zd Z ej                  edk  d      d        Zd Zd Zy)TestInternalsr   r   r   r   r   c                 6   | j                   | j                  z   D ]*  }| j                  t        j                  |      d|z         , | j
                  | j                  z   | j                  z   D ]*  }| j                  t        j                  |      d|z         , y )Nr   r   r   r   s     r;   r   zTestInternals.test_sunder	  s    %%(E(EEDOODOOD13MPT3TU F%%(:(::T=N=NNDT__T24JT4QR Or=   c                 6   | j                   D ]*  }| j                  t        j                  |      d|z         , | j                  | j
                  z   | j                  z   | j                  z   D ]*  }| j                  t        j                  |      d|z         , y )Nr   r   r   r   s     r;   r   zTestInternals.test_dunder  s    %%DOODOOD13MPT3TU &%%(:(::T=Z=ZZ]a]n]nnDT__T24JT4QR or=   c                 .   | j                   | j                  z   D ](  }| j                  t        j                  d|      d       * | j
                  | j                  z   | j                  z   D ](  }| j                  t        j                  d|      d       * y r   r   r   s     r;   r   zTestInternals.test_is_private  r   r=   c                 ~    G d dt               }| j                  t        |      |j                  |j                  |j
                  g       | j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d       y )Nc                   6    e Zd Z e       Z e       Z e       Zy)-TestInternals.test_auto_number.<locals>.ColorNrU	  rK   r=   r;   r  r
    rV	  r=   r  rB   r'   rC   r   r   r   r  r  r  r`  r  s     r;   rW	  zTestInternals.test_auto_number  rX	  r=   c                 ~    G d dt               }| j                  t        |      |j                  |j                  |j
                  g       | j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d       y )Nc                   <    e Zd Zd Z e       Z e       Z e       Zy)+TestInternals.test_auto_name.<locals>.Colorc                     | S r   rK   r   r6  r  r7  s       r;   r9  zATestInternals.test_auto_name.<locals>.Color._generate_next_value_(      r=   N)rE   rF   rG   r9  r   r  r  r  rK   r=   r;   r  r
  '  s    &C6DFEr=   r  r  r  r  r
  r  s     r;   test_auto_namezTestInternals.test_auto_name&  s    	D 	 	euyy%**ekk&JK%0))62**G4r=   c                     G d dt               } G d d|      }| j                  t        |      |j                  |j                  |j
                  g       | j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d       y )Nc                       e Zd Zd Zy):TestInternals.test_auto_name_inherit.<locals>.AutoNameEnumc                     | S r   rK   r
  s       r;   r9  zPTestInternals.test_auto_name_inherit.<locals>.AutoNameEnum._generate_next_value_5  r
  r=   Nr:  rK   r=   r;   AutoNameEnumr
  4  s    r=   r
  c                   6    e Zd Z e       Z e       Z e       Zy)3TestInternals.test_auto_name_inherit.<locals>.ColorNrU	  rK   r=   r;   r  r
  7  rV	  r=   r  r  r  r  r
  )r   r
  r  s      r;   test_auto_name_inheritz$TestInternals.test_auto_name_inherit3  s    	4 		L 	
 	euyy%**ekk&JK%0))62**G4r=   r  z+mixed types with auto() no longer supportedc                     | j                  t        d      5   G d dt              }d d d        | j                  j                  j
                  d       y # 1 sw Y   0xY w)N&will require all values to be sortablec                       e Zd ZdZ e       Zy)1TestInternals.test_auto_garbage_ok.<locals>.Colorr  Nr\	  rK   r=   r;   r  r
  G      vr=   r  rB   )r  r  r   r   r  r`  r  s     r;   test_auto_garbage_okz"TestInternals.test_auto_garbage_okA  sN    
 ""#57_`  a 	))1-	 a`s   AAc                 6   | j                  t        d      5   G d dt              }d d d        | j                  t	              |j
                  |j                  |j                  |j                  g       | j                  |j
                  j                  d       | j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j                  j                  d       y # 1 sw Y   xY w)Nr
  c                   0    e Zd ZdZdZ e       Z e       Zy);TestInternals.test_auto_garbage_corrected_ok.<locals>.Colorr  r'   N)rE   rF   rG   r  r  r   r  r  rK   r=   r;   r  r
  R  s    r=   r  r  r'   rC   rS   )
r  r  r   r   r   r  r  r  r  r`  r  s     r;   test_auto_garbage_corrected_okz,TestInternals.test_auto_garbage_corrected_okL  s    
 ""#57_`    a 	e))UZZellK	M%0))1-**A.++Q/ a`s   DDz*mixed types with auto() will raise in 3.13c                 x    | j                  t        d      5   G d dt              }d d d        y # 1 sw Y   y xY w)Nr
  c                       e Zd ZdZ e       Zy)3TestInternals.test_auto_garbage_fail.<locals>.Colorr  Nr\	  rK   r=   r;   r  r
  e  r
  r=   r  r  r  s     r;   test_auto_garbage_failz$TestInternals.test_auto_garbage_fail_  s.    
 ##I/WX  YXXrW  c                 x    | j                  t        d      5   G d dt              }d d d        y # 1 sw Y   y xY w)Nr
  c                   "    e Zd ZdZdZ e       Zy)=TestInternals.test_auto_garbage_corrected_fail.<locals>.Colorr  r'   N)rE   rF   rG   r  r  r   r  rK   r=   r;   r  r
  o  s    r=   r  r  r  s     r;    test_auto_garbage_corrected_failz.TestInternals.test_auto_garbage_corrected_faili  s.    
 ##I/WX  YXXrW  c                 v    | j                  t              5   G d dt              }d d d        y # 1 sw Y   y xY w)Nc                   <    e Zd Z e       Z e       Z e       Zd Zy),TestInternals.test_auto_order.<locals>.Colorc                     | S r   rK   r
  s       r;   r9  zBTestInternals.test_auto_order.<locals>.Color._generate_next_value_z  s    Kr=   N)rE   rF   rG   r   r  r  r  r9  rK   r=   r;   r  r
  v  s    fv r=   r  r  r  s     r;   test_auto_orderzTestInternals.test_auto_ordert  s(    y)    *))s   /8c                 D   t               d_         G fddt              }| j                  t	        |      |j
                  |j                  g       | j                  |j
                  j                  d       | j                  |j                  j                  d       y )Nzpathological casec                   (    e Zd ZW  Zd Z e       Zy)2TestInternals.test_auto_order_wierd.<locals>.Colorc                     | S r   rK   r
  s       r;   r9  zHTestInternals.test_auto_order_wierd.<locals>.Color._generate_next_value_  r
  r=   N)rE   rF   rG   r  r9  r   r  )
weird_autos   r;   r  r
    s    C6Dr=   r  r  )r   r`  r   r   r   r  r  )r   r  r
  s     @r;   test_auto_order_wierdz#TestInternals.test_auto_order_wierd}  st    V
.
	D 	
 	euyy%**&=>*=>))62r=   z,auto() will return highest value + 1 in 3.13c                 R    G d dt               }| j                  |j                  |j                         | j                  |j                  |j
                         | j                  |j                  |j                         | j                  |j                  |j
                         y )Nc                   >    e Zd Z e       Z e       ZeZeZ e       Zy)3TestInternals.test_auto_with_aliases.<locals>.ColorN)	rE   rF   rG   r   r  r  oxfordcrimsonr  rK   r=   r;   r  r
    s!    &C6DFGFEr=   r  )r   r  r
  r  r
  r  r  r  r  s     r;   test_auto_with_aliasesz$TestInternals.test_auto_with_aliases  sl    
	D 	 	emmUYY/ellEJJ/eii0ejj1r=   c                      G d dt               }| j                  |j                  |j                  |j                  gt        |             y )Nc                   :    e Zd Z e       xZZ e       Z e       Zy)0TestInternals.test_duplicate_auto.<locals>.DupesNra	  rK   r=   r;   rc	  r
    rd	  r=   rc	  re	  rf	  s     r;   rg	  z!TestInternals.test_duplicate_auto  rh	  r=   c                     G d dt               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d        G d dt               }| j                  |j                  j                  d       | j                  |j                  j                  d	       | j                  |j                  j                  d
       | j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j                  j                  d        G d dt               }| j                  |j                  j                  d       | j                  |j                  j                  d       | j                  |j
                  j                  d       y )Nc                   ^    e Zd Z e       Z e        e       fZ e        e        e       fZy)5TestInternals.test_multiple_auto_on_line.<locals>.HuhN)rE   rF   rG   r   r   r   rF  rK   r=   r;   r  r
    s(    &C&$&.CFDFDF*Er=   r  rB   )r'   rC   )rS   rE  r  c                   h    e Zd ZddZd Z e       Z e       Z e       dfZ e       dfZ	 e       Z
y)5TestInternals.test_multiple_auto_on_line.<locals>.HahNc                 v    t         j                  |       }||_        |xs |d d j                         |_        |S r	  )r  r{  r  r  abbr)ri  r`  r
  r   s       r;   r{  z=TestInternals.test_multiple_auto_on_line.<locals>.Hah.__new__  s5    ,!&"7eBQioo&7r=   c                     | S r   rK   r
  s       r;   r9  zKTestInternals.test_multiple_auto_on_line.<locals>.Hah._generate_next_value_  r
  r=   WEDThur   )rE   rF   rG   r{  r9  r   MONDAYTUESDAY	WEDNESDAYTHURSDAYFRIDAYrK   r=   r;   Hahr
    s9    
 VFfGIvu}HVFr=   r
  r
  monr
  tuer
  r
  r
  r
  r
  fric                   d    e Zd Zd Z e       Z e        e       fZ e        e        e       fZy)r
  c                     |dz   S r  rK   r
  s       r;   r9  zKTestInternals.test_multiple_auto_on_line.<locals>.Huh._generate_next_value_  s    Qwr=   N)rE   rF   rG   r9  r   r   r   rF  rK   r=   r;   r  z5TestInternals.test_multiple_auto_on_line.<locals>.Huh  s-    &C&$&.CFDFDF*Er=   )r'   r'   )rC   rC   rC   )r   r   r   r`  r   rF  r
  r
  r
  r
  r
  r
  )r   r  r
  s      r;   test_multiple_auto_on_linez(TestInternals.test_multiple_auto_on_line  s   	+$ 	+ 	*/)4	$ 	 	))84%0**I6))51,,k:++U3++Z8**E2))84%0	+$ 	+ 	*/)4r=   N)rE   rF   rG   r   r   r   r   r   r   r   r   rW	  r
  r
  r  r  r  r
  r
  r
  r
  r
  r
  r
  rg	  r
  rK   r=   r;   r
  r
    s$   1L7L@MLCLSSX	/55 X__g%9.	. X__g%90	0 X__W$8	 X__W$8	 
3 X__W$:
2	
2P*5r=   r
  c                       e Zd Zy)TestEnumTypeSubclassingNr   rK   r=   r;   r
  r
    s    r=   r
  a  Help on class Color in module %s:

class Color(enum.Enum)
 |  Color(*values)
 |
 |  Method resolution order:
 |      Color
 |      enum.Enum
 |      builtins.object
 |
 |  Data and other attributes defined here:
 |
 |  CYAN = <Color.CYAN: 1>
 |
 |  MAGENTA = <Color.MAGENTA: 2>
 |
 |  YELLOW = <Color.YELLOW: 3>
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from enum.Enum:
 |
 |  name
 |      The name of the Enum member.
 |
 |  value
 |      The value of the Enum member.
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from enum.EnumType:
 |
 |  __contains__(value)
 |      Return True if `value` is in `cls`.
 |
 |      `value` is in `cls` if:
 |      1) `value` is a member of `cls`, or
 |      2) `value` is the value of one of the `cls`'s members.
 |      3) `value` is a pseudo-member (flags)
 |
 |  __getitem__(name)
 |      Return the member matching `name`.
 |
 |  __iter__()
 |      Return members in definition order.
 |
 |  __len__()
 |      Return the number of members (no aliases)
 |
 |  ----------------------------------------------------------------------
 |  Readonly properties inherited from enum.EnumType:
 |
 |  __members__
 |      Returns a mapping of member name->value.
 |
 |      This mapping lists all enum members, including aliases. Note that this
 |      is a read-only view of the internal mapping.a:  Help on class Color in module %s:

class Color(enum.Enum)
 |  Color(*values)
 |
 |  Method resolution order:
 |      Color
 |      enum.Enum
 |      builtins.object
 |
 |  Data and other attributes defined here:
 |
 |  CYAN = <Color.CYAN: 1>
 |
 |  MAGENTA = <Color.MAGENTA: 2>
 |
 |  YELLOW = <Color.YELLOW: 3>
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from enum.Enum:
 |
 |  name
 |
 |  value
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from enum.EnumType:
 |
 |  __contains__(value)
 |
 |  __getitem__(name)
 |
 |  __iter__()
 |
 |  __len__()
 |
 |  ----------------------------------------------------------------------
 |  Readonly properties inherited from enum.EnumType:
 |
 |  __members__c                   D    e Zd ZdZ G d de      Zd Zd Zd Zd Z	d Z
y)	
TestStdLibNc                       e Zd ZdZdZdZy)TestStdLib.ColorrB   r'   rC   N)rE   rF   rG   CYANMAGENTAYELLOWrK   r=   r;   r  r
  6  s    r=   r  c                     t         j                  t        t        z  }nt        t        z  }t               }t        j                  |      } || j                         |j                         j                         }| j                  |||       y )N)output)r	   r   !expected_help_output_without_docsrE   expected_help_output_with_docsr   pydocHelperr  getvaluer  r   )r   expected_textr
  helperresults        r;   
test_pydoczTestStdLib.test_pydoc;  sh    ??"=HM:XEMV,tzz"((*7r=   c                    t        dt        fdd| j                  j                  fdt        fd| j                  j
                  fd| j                  j                  fd| j                  j                  fdt        j                  d   fd	t        j                  d	   fd
| j                  j                  fd| j                  j                  fdd| j                  j                  fddt        | j                  d      fd| j                  j                  ff      }t        t        j                   | j                              }| j#                  t%        |j'                               t%        |j'                                      d}|j'                         D ]C  }|dk(  r	||   ||   k7  st)                t)        ddd|d||   d||   dddd       d}E |r| j+                  d       y y )NrU  )r   ...r  rF   r
  r
  r
  r   r`  rC	  __contains__)rE   r  __getitem__)rG   r
  r	  __iter__Fr   
K===========================================================================z
     key: z
  result: z
expected: r%  sepT/result does not equal expected, see print above)r\  r
   r  r  rE   r
  r
  r
  r   r  rC	  r
  r
  r[  r
  inspect
getmembersr   r  keysr3  fail)r   r8  r
  r|  rF  s        r;   test_inspect_getmembersz"TestStdLib.test_inspect_getmembersG  s   h'"

 6 67x(4::,,-DJJ../)v./$--01DJJ../!8!89%

 6 674$gdjj:M&NOTZZ001! $ g((45V[[]+S-?@AI~ayF1I%!1fQiHFKMO  IIGH r=   c                    ddl m}  |ddt        t               |ddt        | j                  j
                         |dd| j                  d	       |d
dt        | j                  j                         |ddt        | j                  j                         |ddt        t        | j                  d             |ddt        | j                  j                         |ddt        t        j                         |dd| j                  t               |dd| j                  d       |dd| j                  d       |dd| j                  | j                  j                         |dd| j                  | j                  j                         |dd| j                  | j                  j                         |ddt        t        j                   d          |ddt        t        j                   d         g}|D ]  }	 |j"                    |j)                  d        t+        t        j,                  | j                              }|j)                  d        | j/                  t1        |      t1        |      |D cg c]  }|j"                   c}d|D cg c]  }|j"                   c}       d}t3        ||      D ]s  \  }}|j"                  d v r>d!D ]8  }t        ||      t        ||      k7  st'        d"d#d"|d"|d"d#d"	d$%       d&}: R||k7  sXt'        d"d#d"|d"|d"d#d"	d$%       d&}u |r| j5                  d'       y y # t$        $ r t'        |       Y jw xY wc c}w c c}w )(Nr   )	AttributerU  data)r   kinddefining_classr  r
  methodr   r
  r
  r
  r	  zclass methodrC	  r  r  rF   rE   r  rG   r
  r
  r
  r
  r   r`  c                     | j                   S r   r  r
  s    r;   <lambda>z>TestStdLib.test_inspect_classify_class_attrs.<locals>.<lambda>      TYYr=   )keyc                     | j                   S r   r  r  s    r;   r  z>TestStdLib.test_inspect_classify_class_attrs.<locals>.<lambda>  r  r=   z != F)r	  r   )r   r	  r
  r
  r
  r%  r
  Tr   )r  r  r  r
   r  r
  r
  r
  r[  rC	  r  rE   r
  r
  r
  r   r  r   rq  r3  sortr   classify_class_attrsr   r  r  r  )	r   r  r8  rG  r
  r   r|  r  r   s	            r;   !test_inspect_classify_class_attrsz,TestStdLib.test_inspect_classify_class_attrsi  s   %{#)(<~H#+DJJ4K4KMyv#'::e=}8#+DJJ4J4JLz#+DJJ4G4GI2#)'$**FY2Z\yx#+DJJ4F4FH}:#+H4H4HJ|&#'::h@z#'::g?~F#'::6HJxf#'::djj6G6GIyv#'::djj6H6HJvF#'::djjooGvF#'f0EGwV#'g0FH?!D A 
 	./g224::>?./FS[/56v!qvvv68PA8PQ	 'DAqvv99 =Dq$'71d+;;h1hOUWX!% = ah1hGRP ( IIGH - " a 78Ps   M M+M0M('M(c                    ddl m}m}m} | j	                   |t
               | |d|j                         |d|j                         |d|j                  d        |d|j                  d        |d|j                  d        |d	|j                  d
       |d|j                  d       g             | j	                   |t        j                         | |d|j                        g             y )Nr   )	signature	Signature	Parameternew_class_namerW  rg   )r  rk   r  r6  rB   r   r8  )r  r  r  r  r   r   POSITIONAL_ONLYPOSITIONAL_OR_KEYWORDKEYWORD_ONLYr.   FlagBoundaryVAR_POSITIONAL)r   r  r  r  s       r;   test_inspect_signaturesz"TestStdLib.test_inspect_signatures  s    ;;$.	0I0IJgy'F'FGh	(>(>Mj)*@*@$Ofi&<&<dKgy'='=qIj)*@*@$O 	 	$++,h	(@(@A 	r=   c                 n   t        t               G d d             } G d dt              }| j                  t        ||      d u        d|j                  _        | j                  t        dt        ||        G d dt        t        	      }|}| j                  t        |      |j                  |j                  |j                  g       t        t        t        	       G d
 d             }|}| j                  t        |      |j                  |j                  |j                  g       t        ||       y )Nc                   <    e Zd ZdZdZdZej                  d        Zy)5TestStdLib.test_test_simple_enum.<locals>.SimpleColorrB   r'   rC   c                      d| j                   z  S Nz	zeroed %sr  r   s    r;   zerothz<TestStdLib.test_test_simple_enum.<locals>.SimpleColor.zeroth      "TYY..r=   N	rE   rF   rG   r
  r
  r
  r  r  r%  rK   r=   r;   SimpleColorr"    s'    DGF^^/ /r=   r(  c                   <    e Zd ZdZdZdZej                  d        Zy)6TestStdLib.test_test_simple_enum.<locals>.CheckedColorrB   r'   rC   c                      d| j                   z  S r$  r  r   s    r;   r%  z=TestStdLib.test_test_simple_enum.<locals>.CheckedColor.zeroth  r&  r=   Nr'  rK   r=   r;   CheckedColorr*    s'    DGF^^/ /r=   r,  r  zenum mismatchc                       e Zd ZdZdZdZdZy)8TestStdLib.test_test_simple_enum.<locals>.CheckedMissingrm
          NrE   rF   rG   
SIXTY_FOURONE_TWENTY_EIGHTTWENTY_FORTY_EIGHTr  rK   r=   r;   CheckedMissingr.    s    J"!%&Cr=   r6  r   c                       e Zd ZdZdZdZdZy)1TestStdLib.test_test_simple_enum.<locals>.Missingrm
  r/  r0  r1  Nr2  rK   r=   r;   ri
  r8    s    J"!%&Cr=   ri
  )r   r   r   r   r
  r  r   r  r   r   r   r   r3  r4  r5  )r   r(  r,  r6  CMri
  Ms          r;   test_test_simple_enumz TestStdLib.test_test_simple_enum  s   	d		/ 	/ 
	/	/4 	/ 	),DLM&'#?!<		'Wt 	'
 n-r?R?RTVTiTi/jk	g	-	' 	' 
.	'
 n-a>P>PRSRfRf/gh.'2r=   )rE   rF   rG   maxDiffr   r  r
  r  r  r  r;  rK   r=   r;   r
  r
  2  s0    G 

8 ID?IB*'3r=   r
  c                   *    e Zd Zd Zd Zd Zd Zd Zy)MiscTestCasec                 @    t        j                  | t        ddh       y )Nbinrz
  )not_exported)r"   check__all__r.   r   s    r;   test__all__zMiscTestCase.test__all__  s    T4u>P6QRr=   c                 Z     G d dt               }| j                  |j                  d        y )Nc                       e Zd ZdZy)'MiscTestCase.test_doc_1.<locals>.SinglerB   Nr	  rK   r=   r;   SinglerF    r	  r=   rG  r   r   r   )r   rG  s     r;   
test_doc_1zMiscTestCase.test_doc_1  s"    	T 	.r=   c                 Z     G d dt               }| j                  |j                  d        y )Nc                       e Zd ZdZdZy)'MiscTestCase.test_doc_2.<locals>.DoublerB   r'   Nr   rK   r=   r;   DoublerL    r  r=   rM  rH  )r   rM  s     r;   
test_doc_2zMiscTestCase.test_doc_2  s$    	T 	 	.r=   c                 Z     G d dt               }| j                  |j                  d        y )Nc                       e Zd ZdZdZdZy)'MiscTestCase.test_doc_3.<locals>.TriplerB   r'   rC   NrE  rK   r=   r;   TriplerQ    r  r=   rR  rH  )r   rR  s     r;   
test_doc_3zMiscTestCase.test_doc_3  s$    	T 	 	.r=   c                 Z     G d dt               }| j                  |j                  d        y )Nc                       e Zd ZdZdZdZdZy)*MiscTestCase.test_doc_4.<locals>.QuadruplerB   r'   rC   rS   N)rE   rF   rG   r   r   rF  rR  rK   r=   r;   	QuadruplerV    s    CCEDr=   rW  rH  )r   rW  s     r;   
test_doc_4zMiscTestCase.test_doc_4   s&    	 	
 	**D1r=   N)rE   rF   rG   rC  rI  rN  rS  rX  rK   r=   r;   r>  r>    s    S/
//2r=   r>  rE  r  ra  r  rB   r`                ?               @              @c                   <    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
y	)
TestConvertc                     t               }dD ]  }d|d|z  <   d|d|z  <    dD ]  \  }}||d|z  <    dD ]  \  }}||d|z  <    d	D ]  \  }}||d
|z  <    y )N)rL  r  r?  r@  rM  rA  rE  zCONVERT_TEST_NAME_%szCONVERT_STRING_TEST_NAME_%s))rL  rE  )r  rY  )r?  r`  zUNCOMPARABLE_%s))rL  r[  )r  r\  )r?  rZ  z
COMPLEX_%s))rB  ra  )rC  r  zCONVERT_STR_TEST_%s)r$  )r   r  suffixr`  s       r;   tearDownzTestConvert.tearDown'  s     I4F12A$v-.89A+f45 5 GMFE,1A&() G>MFE',AlV#$ ??MFE05A#f,- @r=   c                     t         j                  j                  dt        d       }| j	                   |d      j
                  d       y )NUnittestConvertc                 $    | j                  d      S NCONVERT_TEST_r  r  s    r;   r  z@TestConvert.test_convert_value_lookup_priority.<locals>.<lambda>:      o!>r=   filterrE  CONVERT_TEST_NAME_A)r.   r   	_convert_MODULEr   r   r   r	  s     r;   "test_convert_value_lookup_priorityz.TestConvert.test_convert_value_lookup_priority6  sB    LL**!> + @	 	1**,ABr=   c                 d   t         j                  j                  dt        d       }| j	                  |j
                  |j                         | j	                  |j                  d       | j	                  |j                  d       | j	                  |j                  d       | j	                  |j                  d       t        |      D cg c]  }|t        |      vs| }}t        |      D cg c]  }|t        |      vs| }}| j	                  ||z   g d|d|       y c c}w c c}w )Nrc  c                 $    | j                  d      S re  rg  rh  s    r;   r  z.TestConvert.test_convert_int.<locals>.<lambda>D  ri  r=   rj  rE  extra names: ;  missing names: msg)r.   r   rm  rn  r   CONVERT_TEST_NAME_Frl  CONVERT_TEST_NAME_BCONVERT_TEST_NAME_CCONVERT_TEST_NAME_DCONVERT_TEST_NAME_Er  r  r   r	  r   extrarU  s        r;   test_convert_intzTestConvert.test_convert_int@  s   LL**!> + @	
 	66"66	866:66:66:66:"%i.T.$D@S4S.T$,Y$7V$7D4s9~;U4$7V=BGL 	 	 UVs   D(D(1D-D-c                     t         j                  j                  dt        d       }| j	                  t        |      |j                  |j                  |j                  g       y )NUncomparablec                 $    | j                  d      S )NUNCOMPARABLE_rg  rh  s    r;   r  z7TestConvert.test_convert_uncomparable.<locals>.<lambda>Z  ri  r=   rj  )	r.   r   rm  rn  r   r   UNCOMPARABLE_AUNCOMPARABLE_BUNCOMPARABLE_Cr   uncomps     r;   test_convert_uncomparablez%TestConvert.test_convert_uncomparableV  sX    $$> % @
 	L""F$9$96;P;PQ	r=   c                     t         j                  j                  dt        d       }| j	                  t        |      |j                  |j                  |j                  g       y )Nr  c                 $    | j                  d      S )NCOMPLEX_rg  rh  s    r;   r  z2TestConvert.test_convert_complex.<locals>.<lambda>e  s    Q\\*5r=   rj  )	r.   r   rm  rn  r   r   	COMPLEX_A	COMPLEX_B	COMPLEX_Cr  s     r;   test_convert_complexz TestConvert.test_convert_complexa  sW    $$5 % 7
 	Lv//1A1AB	r=   c                    t         j                  j                  dt        d d      }| j	                  |j
                  d       | j	                  |j                  d       t        |      D cg c]  }|t        |      vs| }}t        |      D cg c]  }|t        |      vs| }}| j	                  ||z   g d|d|	       | j	                  t        |j
                        d
t        z         | j	                  t        |j                        d       | j	                  t        |j
                        d       y c c}w c c}w )Nrc  c                 $    | j                  d      S )NCONVERT_STR_rg  rh  s    r;   r  z.TestConvert.test_convert_str.<locals>.<lambda>p  s    n!=r=   Trk  	as_globalra  r  rs  rt  ru  z%s.CONVERT_STR_TEST_1)r.   r	   rm  rn  r   CONVERT_STR_TEST_1CONVERT_STR_TEST_2r  r  r  r	  rY  r_  r|  s        r;   test_convert_strzTestConvert.test_convert_strl  s'   LL**!=	 +  	 	55w?55yA"%i.T.$D@S4S.T$,Y$7V$7D4s9~;U4$7V=BGL 	 	
 	i::;=TWc=cdY99:IF	 < <=wG UVs   .EEE'Ec                     | j                  t              5  t        j                  j	                  dt
        d        d d d        y # 1 sw Y   y xY w)Nrc  c                 $    | j                  d      S re  rg  rh  s    r;   r  z0TestConvert.test_convert_raise.<locals>.<lambda>  ri  r=   rj  )rp  rq  r.   r   _convertrn  r   s    r;   test_convert_raisezTestConvert.test_convert_raise  s=    ~.LL!!!> " @ /..s   (AAc                 @   t         j                  j                  dt        d d      }| j	                  t        |j                        dt        z         | j	                  t        |j                        d       | j	                  t        |j                        d       y )Nrc  c                 $    | j                  d      S )NCONVERT_STRING_TEST_rg  rh  s    r;   r  z7TestConvert.test_convert_repr_and_str.<locals>.<lambda>  s    .D!Er=   Tr  z%s.CONVERT_STRING_TEST_NAME_Ar|  )
r.   r   rm  rn  r   r  CONVERT_STRING_TEST_NAME_Ar	  rY  r_  ro  s     r;   test_convert_repr_and_strz%TestConvert.test_convert_repr_and_str  s    LL**!E	 +  	
 	iBBCEdgsEstYAABCH	 D DEsKr=   N)rE   rF   rG   ra  rp  r~  r  r  r  r  r  rK   r=   r;   r^  r^  &  s.    6C,		H*@Lr=   r^  c                 x   t        g d| j                  z         }| j                  t        j                  ur|j                  d       | j                  t        j                  ur|j                  d       | j                  t        u rt        |      S t        t        t        | j                              |z        S )N)
rU  r
  r   r
  r
  rC	  r  rF   rE   rG   r{  r	  )
r  _member_names__new_member_r  r{  r	  r	  rX  sortedr  )ri  interestings     r;   r  r    s     
   ! K v~~-	"
F$<$<<+,
F"k"" c#c//01K?@@r=   c                    | j                   j                  t        u rt        g d      }nt        t	        |             }| j                   j                         D ]  }|j                  j                         D ]  \  }}|d   dk(  rt        |t        j                        r>|j                  || j                  vr|j                  |       U|j                  |       g|| j                  vsv|j                  |         t        |      S )N)rU  r   r  r	  rF   r   r`  r   r   )rU  rX  r  r  r  r  r  rA  r  r.   r  r   r?  r	  discardr  )r   allowedri  r   r{   s        r;   r  r    s    %%/cdc&k"##%++-ID#Aw#~#t}}-88'4v7J7J+JKK%OOD)V000D! . & '?r=   __main__r   )r  r.   r,   r  r/   r
  r  r  r	  r  builtinsr  r  r   rU  r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ior   pickler   r   r    r!   r  r"   test.supportr#   r$   r%   r&   version_infor  r<   rE   rn  r  r	  rA   r  r  r  rN   r  rP   rR   rX   r]   r_   ra   re   rh   ri   rm   rx   r|   TestCaser~   r   global_enumr   r   r   r   rS  rs  ry  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r(  r,  r3  r6  r  r  r	  r
  r+
  r\
  r
  r
  r
  r
  r
  r>  rz  ry  rx  rl  r{  rw  CONVERT_STRING_TEST_NAME_DCONVERT_STRING_TEST_NAME_CCONVERT_STRING_TEST_NAME_Br  CONVERT_STRING_TEST_NAME_ECONVERT_STRING_TEST_NAME_Fr  r  r  r  r  r  r  r  r^  r  r  mainrK   r=   r;   <module>r     s       	  
     #  X X X N N B B 2 2  @ @  - ) !!"1%& 
||C $$ S$ ud d $ W W 7 J 9(KH(9:F(2=RSF
	 C*
1e(## 1el% % 'DII   'DLL   T  X Xt$4 $4N#3 #3L6& 6&pZ2 Z2z%68I8I J(98;L;L "%6
HDUDU "(J(9:xGXGX 	@z#68I8I 	@@*&98;L;L @
6z#68I8I 
66*&98;L;L 6z#6
HDUDU *&9:xGXGX %
$5x7H7H %,:'8(:K:K ,%
$5x7H7H %,:'8(:K:K ,%J(9:xGXGX %,z+<j(J[J[ ,	!%68I8I 	!
^J(98;L;L 
^	!:':H<M<M 	!
bj*=x?P?P 
b!*&79J9J !_Z):H<M<M _!J(;X=N=N !cz+>@Q@Q cF"i(## F"iRD<!! <~\B(## \B~^OX&& ^OB(("3"3 ("-"" -^C"" CNI5H%% I5V	h// 	7"8 r(% !Tt3"" t3n28$$ 2D                 			jL(## jL^A$& zHMMO Gd  G  J  L  K<  H
  F
  F  		s   V
 V %V4 2W	 *W 6	W3  X X 
VVVV1$V,,V14W9WW	WWWW0#W++W03X8X  XXXXX&%X&