+
    Bi[                       ^ RI t ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHtH	t	  ! R R]4      t
 ! R R	4      t ! R
 R]]4      t]	 ! R R]]4      4       t]	 ! R R]]4      4       t ! R R]4      t]R8X  d   ]P"                  ! 4        R# R# )    N)_header_value_parser)errorspolicy)TestEmailBaseparameterizec                   &   a  ] tR t^t o R tRtV tR# )
TestTokensc                    \         P                  ! R R4      pV P                  VR 4       V P                  \        V4      R4       V P                  VP                  R4       V P                  VP
                  R4       R# )z 	fws N)parserEWWhiteSpaceTerminalassertEqualstrvalue
token_type)selfxs   & @/usr/lib/python3.14/test/test_email/test__header_value_parser.pytest_EWWhiteSpaceTerminal$TestTokens.test_EWWhiteSpaceTerminal   s`    ''u5E"Q$"%u-     N)__name__
__module____qualname____firstlineno__r   __static_attributes____classdictcell____classdict__s   @r   r
   r
      s     . .r   r
   c                   >   a  ] tR t^t o RR ltRR ltRR ltRtV tR# )TestParserMixinNc                   V P                  \        V4      V4       V P                  VP                  V4       V P                  VP                  V4       V P                  W&4       Ve   V P                  VP
                  V4       R # R # N)r   r   r   assertDefectsEqualall_defectscomments)r   tlreststringr   defects	remainderr)   s   &&&&&&&&r   _assert_resultsTestParserMixin._assert_results   sk    R&)5)8)R[[(3  r   c           
     D    V! V4      w  rV P                  WW4WVR R7       V# )N)r)   r/   )
r   methodsourcer,   r   r-   r.   r)   r*   r+   s
   &&&&&&&&  r   _test_get_xTestParserMixin._test_get_x   s.    &>Rvg&* 	 	,	r   c           	     B    V! V4      pV P                  VR W4VR V4       V# r   r2   )r   r3   inputr,   r   r-   r)   r*   s   &&&&&&& r   _test_parse_xTestParserMixin._test_parse_x&   s(    E]RVGRJ	r   r   r&   )	r   r   r   r   r/   r5   r:   r   r    r!   s   @r   r$   r$      s     4 r   r$   c                   &
  a  ] tR t^-t o ]! ]! ^!^4      4      P                  R4      t]P                  ]P                  ,           R,           t]P                  ]P                  RRR4      4      tR tR tR tR tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R t#R t$R t%R t&R t'R t(R t)R t*R  t+R! t,R" t-R# t.R$ t/R% t0R& t1R' t2R( t3R) t4R* t5R+ t6R, t7R- t8R. t9R/ t:R0 t;R1 t<R2 t=R3 t>R4 t?R5 t@R6 tAR7 tBR8 tCR9 tDR: tER; tFR< tGR= tHR> tIR? tJR@ tKRA tLRB tMRC tNRD tORE tPRF tQRG tRRH tSRI tTRJ tURK tVRL tWRM tXRN tYRO tZRP t[RQ t\RR t]RS t^RT t_RU t`RV taRW tbRX tcRY tdRZ teR[ tfR\ tgR] thR^ tiR_ tjR` tkRa tlRb tmRc tnRd toRe tpRf tqRg trRh tsRi ttRj tuRk tvRl twRm txRn tyRo tzRp t{Rq t|Rr t}Rs t~Rt tRu tRv tRw tRx tRy tRz tR{ tR| tR} tR~ tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR Et R EtR EtR EtR EtR EtR EtR EtR EtR Et	R Et
ER  EtER EtER EtER EtER EtER EtER EtER EtER EtER	 EtER
 EtER EtER EtER EtER EtER EtER EtER EtER EtER EtER EtER Et ER Et!ER Et"ER Et#ER Et$ER Et%ER Et&ER Et'ER Et(ER Et)ER Et*ER  Et+ER! Et,ER" Et-ER# Et.ER$ Et/ER% Et0ER& Et1ER' Et2ER( Et3ER) Et4ER* Et5ER+ Et6ER, Et7ER- Et8ER. Et9ER/ Et:ER0 Et;ER1 Et<ER2 Et=ER3 Et>ER4 Et?ER5 Et@ER6 EtAER7 EtBER8 EtCER9 EtDER: EtEER; EtFER< EtGER= EtHER> EtIER? EtJER@ EtKERA EtLERB EtMERC EtNERD EtOERE EtPERF EtQERG EtRERH EtSERI EtTERJ EtUERK EtVERL EtWERM EtXERN EtYERO EtZERP Et[ERQ Et\ERR Et]ERSEt^V Et_ERT# (U  
TestParserasciiz!#$%&'*+-/=?^_`{}|~r   z\[]c                V    V P                  \        P                  ! R ^4      R .4       R# )fooNr   r   _wsp_splitterr   s   &r   test__wsp_splitter_one_word&TestParser.test__wsp_splitter_one_word6   s!    --eQ7%Ar   c                X    V P                  \        P                  ! R ^4      . RO4       R# )zfoo defN)r@    defrA   rC   s   &r   test__wsp_splitter_two_words'TestParser.test__wsp_splitter_two_words9   s#    --i;/B	Dr   c                X    V P                  \        P                  ! R ^4      . RO4       R# )zfoo 	 def jikN)r@    	 zdef jikrA   rC   s   &r   test__wsp_splitter_ws_runs%TestParser.test__wsp_splitter_ws_runs=   s$    --.>B.H	Jr   c                    V P                  \        P                  R R R. R4      pV P                  VP                  R4       R# )z 	  rG   r   r   N)r5   r   get_fwsr   r   )r   r   s   & r   test_get_fws_onlyTestParser.test_get_fws_onlyD   s4    v~~wb"M/r   c                N    V P                  \        P                  R RR. R4       R# ) foorG   r@   Nr5   r   rP   rC   s   &r   test_get_fws_spaceTestParser.test_get_fws_spaceH   s    c2uEr   c                N    V P                  \        P                  R RR. R4       R# )z 	 foo rL   rG   foo NrU   rC   s   &r   test_get_fws_ws_runTestParser.test_get_fws_ws_runK   s    VS"fMr   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)abcNassertRaisesr   HeaderParseErrorr   get_encoded_wordrC   s   &r   *test_get_encoded_word_missing_start_raises5TestParser.test_get_encoded_word_missing_start_raisesP   s6    v6677##E* 8777   A		A	c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z=?abcNr^   rC   s   &r   (test_get_encoded_word_missing_end_raises3TestParser.test_get_encoded_word_missing_end_raisesT   s6    v6677##G, 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z=?abc?=Nr^   rC   s   &r   +test_get_encoded_word_missing_middle_raises6TestParser.test_get_encoded_word_missing_middle_raisesX   s6    v6677##I. 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z=?utf-8?X?somevalue?=Nr^   rC   s   &r   !test_get_encoded_word_invalid_cte,TestParser.test_get_encoded_word_invalid_cte\   s7    v6677##$;< 8777rd   c                N    V P                  \        P                  R RR. R4       R# )z#=?us-ascii?q?this_is_a_test?=  birdthis is a test  birdNr5   r   ra   rC   s   &r   test_get_encoded_word_valid_ew)TestParser.test_get_encoded_word_valid_ew`   s'    00>))!	#r   c                l    V P                  \        P                  R RR\        P                  .R4       R# )z#=?us-ascii?q?this is a test?=  birdro   rp   Nr5   r   ra   r   InvalidHeaderDefectrC   s   &r   %test_get_encoded_word_internal_spaces0TestParser.test_get_encoded_word_internal_spacesh   s0    00>)) 445!	#r   c                N    V P                  \        P                  R RR. R4       R# )z(=?us-ascii?q?first?=  =?utf-8?q?second?=firstz  =?utf-8?q?second?=Nrq   rC   s   &r    test_get_encoded_word_gets_first+TestParser.test_get_encoded_word_gets_firstp   s'    00C  /	1r   c                l    V P                  \        P                  R RR\        P                  .R4       R# )z&=?us-ascii?q?first?==?utf-8?q?second?=rz   z=?utf-8?q?second?=Nru   rC   s   &r   1test_get_encoded_word_gets_first_even_if_no_space<TestParser.test_get_encoded_word_gets_first_even_if_no_spacex   s0    00A   445-	/r   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  VP
                  R4       R# )z =?us-ascii*jive?q?first_second?=first secondr   us-asciijiveNr5   r   ra   r   charsetlangr   ews   & r   +test_get_encoded_word_sets_extra_attributes6TestParser.test_get_encoded_word_sets_extra_attributes   sS    f55;'' 	Z0&)r   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  VP
                  R4       R# )z=?us-ascii?q?first_second?=r   r   r   Nr   r   s   & r   +test_get_encoded_word_lang_default_is_blank6TestParser.test_get_encoded_word_lang_default_is_blank   sS    f556'' 	Z0"%r   c                l    V P                  \        P                  R RR\        P                  .R4       R# )z=?us-ascii?q?firstsecond?=zfirstsecondr   N)r5   r   ra   r   NonPrintableDefectrC   s   &r   *test_get_encoded_word_non_printable_defect5TestParser.test_get_encoded_word_non_printable_defect   s0    009** 334	r   c                N    V P                  \        P                  R RR. R4       R# )z=?us-ascii?q?=20foo?=rT   r   Nrq   rC   s   &r   ,test_get_encoded_word_leading_internal_space7TestParser.test_get_encoded_word_leading_internal_space   s'    00/	r   c                N    V P                  \        P                  R RR. R4       R# )z=?utf-8?q?=C3=89ric?=   Éricr   Nrq   rC   s   &r   3test_get_encoded_word_quopri_utf_escape_follows_cte>TestParser.test_get_encoded_word_quopri_utf_escape_follows_cte   s'    00/	r   c                6    \         P                  ! V4      pVR 3# r8   )r   get_unstructured)r   r   tokens   && r   	_get_unstTestParser._get_unst   s    ''.byr   c                F    V P                  V P                  R R R . R 4       R# r   Nr5   r   rC   s   &r   test_get_unstructured_null%TestParser.test_get_unstructured_null   s    RR<r   c                F    V P                  V P                  R R R . R4       R# r@   r   Nr   rC   s   &r   test_get_unstructured_one_word)TestParser.test_get_unstructured_one_word   s    ub"Er   c                F    V P                  V P                  R R R . R4       R# )foo bar birdr   Nr   rC   s   &r   #test_get_unstructured_normal_phrase.TestParser.test_get_unstructured_normal_phrase   s$    )7)7)+)+		-r   c                F    V P                  V P                  R R R. R4       R# )zfoo 	 bar      birdr   r   Nr   rC   s   &r   3test_get_unstructured_normal_phrase_with_whitespace>TestParser.test_get_unstructured_normal_phrase_with_whitespace   s%    )?)?)7)+)+		-r   c                F    V P                  V P                  R R R. R4       R# )z	  foo barz foo barr   Nr   rC   s   &r   (test_get_unstructured_leading_whitespace3TestParser.test_get_unstructured_leading_whitespace   $    )4)3)+)+		-r   c                F    V P                  V P                  R R R. R4       R# )	foo bar  zfoo bar r   Nr   rC   s   &r   )test_get_unstructured_trailing_whitespace4TestParser.test_get_unstructured_trailing_whitespace   r   r   c                F    V P                  V P                  R R R. R4       R# )z  foo bar  z	 foo bar r   Nr   rC   s   &r   5test_get_unstructured_leading_and_trailing_whitespace@TestParser.test_get_unstructured_leading_and_trailing_whitespace   s$    )6)4)+)+		-r   c                F    V P                  V P                  R RR. R4       R# )z=?us-ascii?q?bar?=barr   Nr   rC   s   &r   (test_get_unstructured_one_valid_ew_no_ws3TestParser.test_get_unstructured_one_valid_ew_no_ws   s%    )=).).)+)+		-r   c                F    V P                  V P                  R RR. R4       R# )z=?us-ascii?q?bar?=  bar  bar r   Nr   rC   s   &r   (test_get_unstructured_one_ew_trailing_ws3TestParser.test_get_unstructured_one_ew_trailing_ws   s%    )?)0)/)+)+		-r   c                F    V P                  V P                  R RR. R4       R# )z=?us-ascii?q?bar?= birdzbar birdr   Nr   rC   s   &r   0test_get_unstructured_one_valid_ew_trailing_text;TestParser.test_get_unstructured_one_valid_ew_trailing_text   s%    )B)3)3)+)+		-r   c                F    V P                  V P                  R RR. R4       R# )zfoo =?us-ascii?q?bar?= birdr   r   Nr   rC   s   &r   6test_get_unstructured_phrase_with_ew_in_middle_of_textATestParser.test_get_unstructured_phrase_with_ew_in_middle_of_text   s%    )F)7)7)+)+		-r   c                F    V P                  V P                  R RR. R4       R# )z*foo =?us-ascii?q?bar?= =?us-ascii?q?bird?=foo barbirdr   Nr   rC   s   &r   (test_get_unstructured_phrase_with_two_ew3TestParser.test_get_unstructured_phrase_with_two_ew   s%    8	r   c                F    V P                  V P                  R RR. R4       R# )z-foo =?us-ascii?q?bar?= =?us-ascii?q?bird?=   zfoo barbird   zfoo barbird r   Nr   rC   s   &r   4test_get_unstructured_phrase_with_two_ew_trailing_ws?TestParser.test_get_unstructured_phrase_with_two_ew_trailing_ws   s%    ;	r   c                F    V P                  V P                  R RR. R4       R# )z  =?us-ascii?q?bar?=z  bar barr   Nr   rC   s   &r   4test_get_unstructured_phrase_with_ew_with_leading_ws?TestParser.test_get_unstructured_phrase_with_ew_with_leading_ws  s%    "	r   c                F    V P                  V P                  R RR. R4       R# )z-foo =?us-ascii?q?bar?= 	  =?us-ascii?q?bird?=r   r   Nr   rC   s   &r   1test_get_unstructured_phrase_with_two_ew_extra_ws<TestParser.test_get_unstructured_phrase_with_two_ew_extra_ws  s%    <	r   c                F    V P                  V P                  R RR. R4       R# )z-=?us-ascii?q?test?=   =?us-ascii?q?foo?=  valztestfoo  valztestfoo valr   Nr   rC   s   &r   3test_get_unstructured_two_ew_extra_ws_trailing_text>TestParser.test_get_unstructured_two_ew_extra_ws_trailing_text  s%    ;	r   c                F    V P                  V P                  R RR. R4       R# )z=?iso-8859-1?q?hello=20world?=zhello worldr   Nr   rC   s   &r   )test_get_unstructured_ew_with_internal_ws4TestParser.test_get_unstructured_ew_with_internal_ws   s%    ,	r   c                F    V P                  V P                  R RR. R4       R# )z6   =?us-ascii?q?=20test?=   =?us-ascii?q?=20foo?=  valz    test foo  valz  test foo valr   Nr   rC   s   &r   1test_get_unstructured_ew_with_internal_leading_ws<TestParser.test_get_unstructured_ew_with_internal_leading_ws(  s%    D	r   c                F    V P                  V P                  R R R . R4       R# )z
=?test valr   Nr   rC   s   &r    test_get_unstructured_invalid_ew+TestParser.test_get_unstructured_invalid_ew0  s%    	r   c                    V P                  V P                  R P                  RR4      RR\        P                  .R4       R# )s   test foo  valr>   surrogateescapeu   test foo  valu   test foo valr   Nr5   r   decoder   UndecodableBytesDefectrC   s   &r   'test_get_unstructured_undecodable_bytes2TestParser.test_get_unstructured_undecodable_bytes8  s<     ''1BC! **+	r   c                    V P                  V P                  R P                  RR4      RR\        P                  .^,          R4       R# )s4   =?us-ascii?q?=20test?=   =?us-ascii?q?=20foo?=  valr>   r   u    test foo  valu    test foo valr   Nr   rC   s   &r   -test_get_unstructured_undecodable_bytes_in_EW8TestParser.test_get_unstructured_undecodable_bytes_in_EW@  sB     &*;<"!**+A-	r   c                d    V P                  V P                  R RR\        P                  .R4       R# )z=?utf-8?b?dmk?=vir   N)r5   r   r   InvalidBase64PaddingDefectrC   s   &r   ,test_get_unstructured_missing_base64_padding7TestParser.test_get_unstructured_missing_base64_paddingI  s.    ../	r   c                d    V P                  V P                  R RR\        P                  .R4       R# )z=?utf-8?b?dmk===?=r   r   N)r5   r   r   InvalidBase64CharactersDefectrC   s   &r   .test_get_unstructured_invalid_base64_character9TestParser.test_get_unstructured_invalid_base64_characterQ  s.    $112	r   c                    V P                  V P                  R RR\        P                  \        P                  .R4       R# )z=?utf-8?b?dmk?=r   r   N)r5   r   r   r   r   rC   s   &r   >test_get_unstructured_invalid_base64_character_and_bad_paddingITestParser.test_get_unstructured_invalid_base64_character_and_bad_paddingY  s9    !11..0	r   c                d    V P                  V P                  R RR\        P                  .R4       R# )z=?utf-8?b?abcde?=abcder   N)r5   r   r   InvalidBase64LengthDefectrC   s   &r   +test_get_unstructured_invalid_base64_length6TestParser.test_get_unstructured_invalid_base64_lengthb  s.    --.	r   c                    V P                  V P                  R RR\        P                  \        P                  .R4       R# )z=?utf-8?q?foo?==?utf-8?q?bar?=foobarr   Nr5   r   r   rv   rC   s   &r   /test_get_unstructured_no_whitespace_between_ews:TestParser.test_get_unstructured_no_whitespace_between_ewsk  s9    ,''&&(	r   c                d    V P                  V P                  R RR\        P                  .R4       R# )z!nowhitespace=?utf-8?q?somevalue?=nowhitespacesomevaluer   Nr   rC   s   &r   3test_get_unstructured_ew_without_leading_whitespace>TestParser.test_get_unstructured_ew_without_leading_whitespacet  /    NN/##''(	r   c                d    V P                  V P                  R RR\        P                  .R4       R# )z!=?utf-8?q?somevalue?=nowhitespacesomevaluenowhitespacer   Nr   rC   s   &r   4test_get_unstructured_ew_without_trailing_whitespace?TestParser.test_get_unstructured_ew_without_trailing_whitespace}  r  r   c                d    V P                  V P                  R RR\        P                  .R4       R# )z=?utf-8?q?somevalue?=aasomevalueaar   Nr   rC   s   &r   ;test_get_unstructured_without_trailing_whitespace_hang_caseFTestParser.test_get_unstructured_without_trailing_whitespace_hang_case  s.    %''(	r   c                F    V P                  V P                  R R R . R4       R# )z=?utf-8?q?=somevalue?=r   Nr   rC   s   &r   !test_get_unstructured_invalid_ew2,TestParser.test_get_unstructured_invalid_ew2  %    $$$	r   c                F    V P                  V P                  R R R . R4       R# )z=?utf-8?X?=somevalue?=r   Nr   rC   s   &r   $test_get_unstructured_invalid_ew_cte/TestParser.test_get_unstructured_invalid_ew_cte  r  r   c                    V P                  \        P                  R R R. R4      pV P                  VP                  R4       R# )r   rG   r   ptextN)r5   r   get_qp_ctextr   r   r   r  s   & r   test_get_qp_ctext_only!TestParser.test_get_qp_ctext_only  s<      !4!4 ((CRA))73r   c                    V P                   P                  R R4      pVP                  RR4      pVP                  RR4      pV P                  \        P                  WP                   R. R4      pR# )	\\\(z\()z\)rG   r   N)rfc_printable_asciireplacer5   r   r  r   with_qpr  s   &  r    test_get_qp_ctext_all_printables+TestParser.test_get_qp_ctext_all_printables  sd    **224@##C///#u-  !4!4!(*B*BCRQr   c                N    V P                  \        P                  R RR. R4       R# )foo der@   rG    deNr5   r   r  rC   s   &r   &test_get_qp_ctext_two_words_gets_first1TestParser.test_get_qp_ctext_two_words_gets_first  #    ,, %b%	9r   c                N    V P                  \        P                  R RR. R4       R# )foo 		der@   rG    		deNr*  rC   s   &r   )test_get_qp_ctext_following_wsp_preserved4TestParser.test_get_qp_ctext_following_wsp_preserved  s$    ,,$eS"i	Ar   c                N    V P                  \        P                  R RR. R4       R# )zfoo)r@   rG   r   Nr*  rC   s   &r   (test_get_qp_ctext_up_to_close_paren_only3TestParser.test_get_qp_ctext_up_to_close_paren_only  #    ,,sB	5r   c                N    V P                  \        P                  R RR. R4       R# )zfoo  )r@   rG   z  )Nr*  rC   s   &r   2test_get_qp_ctext_wsp_before_close_paren_preserved=TestParser.test_get_qp_ctext_wsp_before_close_paren_preserved  r-  r   c                N    V P                  \        P                  R RR. R4       R# )zfoo)barr@   rG   z)barNr*  rC   s   &r   &test_get_qp_ctext_close_paren_mid_word1TestParser.test_get_qp_ctext_close_paren_mid_word  #    ,,!5#r6	;r   c                N    V P                  \        P                  R RR. R4       R# )zfoo(r@   rG   r  Nr*  rC   s   &r   'test_get_qp_ctext_up_to_open_paren_only2TestParser.test_get_qp_ctext_up_to_open_paren_only  r6  r   c                N    V P                  \        P                  R RR. R4       R# )zfoo  (r@   rG   z  (Nr*  rC   s   &r   1test_get_qp_ctext_wsp_before_open_paren_preserved<TestParser.test_get_qp_ctext_wsp_before_open_paren_preserved  r-  r   c                N    V P                  \        P                  R RR. R4       R# )zfoo(barr@   rG   z(barNr*  rC   s   &r   %test_get_qp_ctext_open_paren_mid_word0TestParser.test_get_qp_ctext_open_paren_mid_word  r=  r   c                    V P                  \        P                  R RR\        P                  .R4      pV P                  VP                  ^ ,          P                  ^ ,          R4       R# )zfoo bar)foo barrG   r    N)r5   r   r  r   r   r   r-   non_printablesr  s   & r    test_get_qp_ctext_non_printables+TestParser.test_get_qp_ctext_non_printables  sV      !4!4 -|S!'!:!: ;SB 	q)88;VDr   c                N    V P                  \        P                  R RR. R 4       R# )r   r   rG   Nr*  rC   s   &r   "test_get_qp_ctext_close_paren_only-TestParser.test_get_qp_ctext_close_paren_only  #    ,,Rb#	/r   c                N    V P                  \        P                  R RR. R 4       R# )r  r   rG   Nr*  rC   s   &r   !test_get_qp_ctext_open_paren_only,TestParser.test_get_qp_ctext_open_paren_only  rP  r   c                N    V P                  \        P                  R R R. R 4       R# )r   rG   Nr*  rC   s   &r   test_get_qp_ctext_no_end_char(TestParser.test_get_qp_ctext_no_end_char  s#    ,,BR	-r   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       R# r   r   r  N)r5   r   get_qcontentr   r   r  s   & r   test_get_qcontent_only!TestParser.test_get_qcontent_only  s<      !4!4 ((Hb"F))73r   c                    V P                   P                  R R4      pVP                  RR4      pV P                  \        P                  VV P                   V P                   . R4      pR# )r  r  "z\"r   N)r!  r"  r5   r   rY  r#  s   &  r    test_get_qcontent_all_printables+TestParser.test_get_qcontent_all_printables  s]    **224@##C/  !4!4g!%!9!9!%!9!92rCr   c                N    V P                  \        P                  R RR. R4       R# )r(  r@   r)  Nr5   r   rY  rC   s   &r   &test_get_qcontent_two_words_gets_first1TestParser.test_get_qcontent_two_words_gets_first  #    ,, %E	;r   c                N    V P                  \        P                  R RR. R4       R# )r/  r@   r0  Nra  rC   s   &r   )test_get_qcontent_following_wsp_preserved4TestParser.test_get_qcontent_following_wsp_preserved  s$    ,,$eUB		Cr   c                N    V P                  \        P                  R RR. R4       R# )foo"r@   r]  Nra  rC   s   &r   #test_get_qcontent_up_to_dquote_only.TestParser.test_get_qcontent_up_to_dquote_only  s#    ,,ub#	7r   c                N    V P                  \        P                  R RR. R4       R# )zfoo  "r@   z  "Nra  rC   s   &r   2test_get_qcontent_wsp_before_close_paren_preserved=TestParser.test_get_qcontent_wsp_before_close_paren_preserved  rd  r   c                N    V P                  \        P                  R RR. R4       R# )zfoo"barr@   z"barNra  rC   s   &r   &test_get_qcontent_close_paren_mid_word1TestParser.test_get_qcontent_close_paren_mid_word  s#    ,,!5%V	=r   c                    V P                  \        P                  R RR\        P                  .R4      pV P                  VP                  ^ ,          P                  ^ ,          R4       R# )zfoo fg"zfoo fgr]  rI  N)r5   r   rY  r   r   r   r-   rJ  r  s   & r    test_get_qcontent_non_printables+TestParser.test_get_qcontent_non_printables  sV      !4!4 ,k;!'!:!: ;SB 	q)88;VDr   c                N    V P                  \        P                  R RR. R 4       R# )r]  r   Nra  rC   s   &r   test_get_qcontent_empty"TestParser.test_get_qcontent_empty  s#    ,,b"b#	/r   c                N    V P                  \        P                  R R R . R 4       R# r   ra  rC   s   &r   test_get_qcontent_no_end_char(TestParser.test_get_qcontent_no_end_char  s#    ,,RR	-r   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       R# )r   r   atextN)r5   r   	get_atextr   r   r   r|  s   & r   test_get_atext_onlyTestParser.test_get_atext_only  <      !1!1 ((Hb"F))73r   c                    V P                  \        P                  V P                  V P                  V P                  . R 4      pR# r   )r5   r   r}  rfc_atext_charsr~  s   & r   test_get_atext_all_atext#TestParser.test_get_atext_all_atext  8      !1!143G3G!%!5!5!%!5!5r2?r   c                N    V P                  \        P                  R RR. R4       R# foo barr@   r   Nr5   r   r}  rC   s   &r   #test_get_atext_two_words_gets_first.TestParser.test_get_atext_two_words_gets_first  #    ))!5%V	=r   c                N    V P                  \        P                  R RR. R4       R# z	foo 		barr@   z 		barNr  rC   s   &r   &test_get_atext_following_wsp_preserved1TestParser.test_get_atext_following_wsp_preserved  $    ))%ueR	Er   c                N    V P                  \        P                  R RR. R4       R# zfoo@barr@   z@barNr  rC   s   &r   test_get_atext_up_to_special'TestParser.test_get_atext_up_to_special#  r  r   c                    V P                  \        P                  R RR\        P                  .R4      pV P                  VP                  ^ ,          P                  ^ ,          R4       R# )zfoo bar(rH  r  rI  N)r5   r   r}  r   r   r   r-   rJ  r~  s   & r   test_get_atext_non_printables(TestParser.test_get_atext_non_printables'  V      !1!1 -|\!'!:!: ;SB 	q)88;VDr   c                    V P                  \        P                  R R R. R4      pV P                  VP                  R4       R# )"foo"r@   r   bare-quoted-stringN)r5   r   get_bare_quoted_stringr   r   )r   bqss   & r    test_get_bare_quoted_string_only+TestParser.test_get_bare_quoted_string_only/  s;    v<<&B@)=>r   c                l   V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       V P                  \        P                  4      ;_uu_ 4        \        P                  ! R4       RRR4       R#   + '       g   i     LX; i  + '       g   i     R# ; i)ri  Nz  "foo")r_   r   r`   r   r  rC   s   &r   2test_get_bare_quoted_string_must_start_with_dquote=TestParser.test_get_bare_quoted_string_must_start_with_dquote4  sl    v6677))&1 8v6677)))4 87 87777   B.B"B	"B3	c                N    V P                  \        P                  R R R. R4       R# ""r   Nr5   r   r  rC   s   &r   'test_get_bare_quoted_string_only_quotes2TestParser.test_get_bare_quoted_string_only_quotes:  s#    66tRR	1r   c                l    V P                  \        P                  R RR\        P                  .R4       R# )r]  r  r   Nr5   r   r  r   rv   rC   s   &r   -test_get_bare_quoted_string_missing_endquotes8TestParser.test_get_bare_quoted_string_missing_endquotes>  s-    66dB)C)C(Db	Jr   c                N    V P                  \        P                  R RR. R4       R# )z
"foo"	 barr  r@   z	 barNr  rC   s   &r   3test_get_bare_quoted_string_following_wsp_preserved>TestParser.test_get_bare_quoted_string_following_wsp_preservedB  s#    66GUB	:r   c                N    V P                  \        P                  R R R. R4       R# )z"foo bar moo"zfoo bar moor   Nr  rC   s   &r   *test_get_bare_quoted_string_multiple_words5TestParser.test_get_bare_quoted_string_multiple_wordsF  $    66o}b"	Fr   c                N    V P                  \        P                  R R R. R4       R# )z" foo  moo	"z
 foo  moo	r   Nr  rC   s   &r   8test_get_bare_quoted_string_multiple_words_wsp_preservedCTestParser.test_get_bare_quoted_string_multiple_words_wsp_preservedJ  r  r   c                N    V P                  \        P                  R RR. R4       R# )z"foo"barr  r@   r   Nr  rC   s   &r   /test_get_bare_quoted_string_end_dquote_mid_word:TestParser.test_get_bare_quoted_string_end_dquote_mid_wordN  s#    66%U	4r   c                N    V P                  \        P                  R RR. R4       R# )z
"foo\"in"az	"foo\"in"zfoo"inaNr  rC   s   &r   )test_get_bare_quoted_string_quoted_dquote4TestParser.test_get_bare_quoted_string_quoted_dquoteR  s#    66L(B	=r   c                l    V P                  \        P                  R R R\        P                  .R4       R# )z"aa"zaar   N)r5   r   r  r   r   rC   s   &r   *test_get_bare_quoted_string_non_printables5TestParser.test_get_bare_quoted_string_non_printablesV  s-    66X''("	.r   c                    V P                  \        P                  R RR\        P                  .R4       V P                  \        P                  RRR\        P                  .R4       R# )z"foor  r@   r   z"foo z"foo "rY   Nr  rC   s   &r   )test_get_bare_quoted_string_no_end_dquote4TestParser.test_get_bare_quoted_string_no_end_dquote[  sZ    66We(()2	/ 	66h(()2	/r   c                N    V P                  \        P                  R R R. R4       R# r  r  rC   s   &r   (test_get_bare_quoted_string_empty_quotes3TestParser.test_get_bare_quoted_string_empty_quotesc  s#    66$B	$r   c                    V P                  \        P                  R RR\        P                  \        P                  .R4       R# )z"=?utf-8?Q?not_really_valid?="z"not really valid"znot really validr   Nr  rC   s   &r   test_encoded_word_inside_quotes*TestParser.test_encoded_word_inside_quotesh  s;    66, '''')	r   c           	         V P                  \        P                  R R R. RR.4      pV P                  VP                  R4       R# )	(comment)rG   r   commentN)r5   r   get_commentr   r   r   r  s   & r   test_get_comment_only TestParser.test_get_comment_onlys  s@    ""6#5#5c2rI;@++Y7r   c                l   V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       V P                  \        P                  4      ;_uu_ 4        \        P                  ! R4       RRR4       R#   + '       g   i     LX; i  + '       g   i     R# ; i)ri  Nz  (foo")r_   r   r`   r   r  rC   s   &r   &test_get_comment_must_start_with_paren1TestParser.test_get_comment_must_start_with_parenx  sl    v6677v& 8v6677y) 87 87777r  c           	     R    V P                  \        P                  R RR. RR.4       R# )z(comment)  	r  rG     	r  Nr5   r   r  rC   s   &r   (test_get_comment_following_wsp_preserved3TestParser.test_get_comment_following_wsp_preserved~  (    ++[#r6I;	Hr   c           	     R    V P                  \        P                  R RR. RR.4       R# )z(foo bar)  		(foo bar)rG   r  r  Nr  rC   s   &r   test_get_comment_multiple_words*TestParser.test_get_comment_multiple_words  r  r   c           	     R    V P                  \        P                  R RR. RR.4       R# )z( foo  bar	 )  	z( foo  bar	 )rG   r  z foo  bar	 Nr  rC   s   &r   -test_get_comment_multiple_words_wsp_preserved8TestParser.test_get_comment_multiple_words_wsp_preserved  s*    ++ "2CV 	"r   c           	     R    V P                  \        P                  R RR. RR.4       R# )z(foo)bar(foo)rG   r   r@   Nr  rC   s   &r   #test_get_comment_end_paren_mid_word.TestParser.test_get_comment_end_paren_mid_word  s'    ++b%%	:r   c           	     R    V P                  \        P                  R R R. RR.4       R# )z(foo\) \(\)bar)rG   r   z
foo) ()barNr  rC   s   &r   test_get_comment_quoted_parens)TestParser.test_get_comment_quoted_parens  s)    ++ 2CR,	Qr   c           	     p    V P                  \        P                  R R R\        P                  .RR.4       R# )z	(foobar)rG   r   zfoobarN)r5   r   r  r   r   rC   s   &r   test_get_comment_non_printable)TestParser.test_get_comment_non_printable  s1    ++NC&&'l^	=r   c           	         V P                  \        P                  R RR\        P                  .RR.4       V P                  \        P                  RRR\        P                  .RR.4       R# )	z(foo barr  rG   r   r  z
(foo bar  z(foo bar  )r   Nr5   r   r  r   rv   rC   s   &r   test_get_comment_no_end_paren(TestParser.test_get_comment_no_end_paren  sb    ++S''("yk	; 	++-''("{m	=r   c           	         V P                  \        P                  R R R. RR.4      pV P                  V^,          P                  R4       R# )z
(foo(bar))rG   r   zfoo(bar)r   Nr5   r   r  r   contentr  s   & r   test_get_comment_nested_comment*TestParser.test_get_comment_nested_comment  sD    ""6#5#5,Rj\C++U3r   c           	         V P                  \        P                  R R R. RR.4      pV P                  V^,          P                  R4       R# )z(foo ( bar ) )rG   r   zfoo ( bar )  bar Nr  r  s   & r   #test_get_comment_nested_comment_wsp.TestParser.test_get_comment_nested_comment_wsp  sF    ""6#5#5.Rn=MO++W5r   c           	     R    V P                  \        P                  R R R. RR.4       R# )z()rG   r   Nr  rC   s   &r   test_get_comment_empty_comment)TestParser.test_get_comment_empty_comment  s'    ++$RbT	+r   c           	     ^   V P                  \        P                  R R R. RR.4      p\        ^^ R4       FY  pV P	                  V^ ,          P
                  RV^,
          ,          R,           RV^,
          ,          ,           4       V^ ,          pK[  	  V P	                  VP
                  R4       R# )	(((((foo)))))rG   r   ((((foo))))r  r@   r   N)r5   r   r  ranger   r  )r   r  is   &  r   !test_get_comment_multiple_nesting,TestParser.test_get_comment_multiple_nesting  s    ""6#5#5_c2rM?Lq!RAWQZ//ac5ac1JKajG ! 	%0r   c           	     ~    V P                  \        P                  R RR\        P                  .^,          RR.4       R# )z(((((foo)))r  rG   r   r   Nr  rC   s   &r   'test_get_comment_missing_end_of_nesting2TestParser.test_get_comment_missing_end_of_nesting  s7    ++?C''(*B	Ar   c           	         V P                  \        P                  R R R. RR.4      pV P                  V^,          P                  R4       R# )z(foo (b\)))rG   r   z	foo (b\))zb)Nr  r  s   & r   %test_get_comment_qs_in_nested_comment0TestParser.test_get_comment_qs_in_nested_comment  sD    ""6#5#5NCR,I++T2r   c           	         V P                  \        P                  R R R. R. 4      pV P                  VP                  R4       R# )z  	 	rG   r   cfwsN)r5   r   get_cfwsr   r   r   r  s   & r   test_get_cfws_only_ws TestParser.test_get_cfws_only_ws  s9    y#r2r3&1r   c           	         V P                  \        P                  R R R. RR.4      pV P                  V^ ,          P                  R4       R# )r  rG   r   r@   Nr5   r   r  r   r  r  s   & r   test_get_cfws_only_comment%TestParser.test_get_cfws_only_comment  s?    Wc2rE74a%0r   c           
         V P                  \        P                  R R R. RRR.4      pV P                  V^,          P                  R4       V P                  V^,          P                  R4       R# )z (foo )  ( bar) rG   r   rY   r   Nr  r  s   & r   test_get_cfws_only_mixed#TestParser.test_get_cfws_only_mixed  s^     2CR " 	a&1a&1r   c           	         V P                  \        P                  R RR. RR.4      pV P                  V^ ,          P                  R4       R# )z	(foo) bar(foo) rG   r   r@   Nr  r  s   & r    test_get_cfws_ends_at_non_leader+TestParser.test_get_cfws_ends_at_non_leader  s?    3EE7<a%0r   c           	         V P                  \        P                  R RR. RR.4      pV P                  V^ ,          P                  R4       R# )z(foo) r  rG   r@   Nr  r  s   & r   #test_get_cfws_ends_at_non_printable.TestParser.test_get_cfws_ends_at_non_printable  s?    (CVeW>a%0r   c           	         V P                  \        P                  R RR\        P                  .RR.4      pV P                  V^ ,          P                  R4       R# )z(foo ) "test"z(foo ) rG   z"test"zfoo N)r5   r   r  r   r   r   r  r  s   & r   &test_get_cfws_non_printable_in_comment1TestParser.test_get_cfws_non_printable_in_comment  sL    &&'J<A 	a*5r   c           	         V P                  \        P                  R RR\        P                  .RR.4      pV P                  V^,          P                  R4       R# )z  (foo z  (foo )rG   r   rY   N)r5   r   r  r   rv   r   r  r  s   & r   $test_get_cfws_header_ends_in_comment/TestParser.test_get_cfws_header_ends_in_comment  sK    z3''("vh8 	a&1r   c           
         V P                  \        P                  R R R. RRR.4      pV P                  V^ ,          P                  R.4       V P                  V^,          P                  R.4       R# )z(foo (bar)) ((a)(a))rG   r   z	foo (bar)z(a)(a)N)r5   r   r  r   r)   r  s   & r   &test_get_cfws_multiple_nested_comments1TestParser.test_get_cfws_multiple_nested_comments  sf    "$:C[(+- 	a))K=9a))H:6r   c                    V P                  \        P                  R R R. R4      pV P                  VP                  R4       V P                  VP
                  R 4       V P                  VP                  R4       R# )z"bob"bobr   quoted-stringN)r5   r   get_quoted_stringr   r   quoted_valuer  r   qss   & r   test_get_quoted_string_only&TestParser.test_get_quoted_string_only  sa    f66WeR-8'2U+r   c                    V P                  \        P                  R R R. R4      pV P                  VP                  R4       V P                  VP
                  R4       R# )z		 "bob"   bob r    "bob" r+  N)r5   r   r-  r   r.  r  r/  s   & r   test_get_quoted_string_with_wsp*TestParser.test_get_quoted_string_with_wsp  sM    f66,R9)4U+r   c                f   V P                  \        P                  R R R. R4      pV P                  V^ ,          ^,          P                  R4       V P                  V^,          ^ ,          P                  R4       V P                  VP                  R4       V P                  VP
                  R4       R# )z (foo) "bob"(bar)r4  r   r@   r   r+  r5  Nr5   r   r-  r   r  r.  r/  s   & r   ,test_get_quoted_string_with_comments_and_wsp7TestParser.test_get_quoted_string_with_comments_and_wsp  s    f66!4gr2GAq))51Aq))51U+)4r   c                P   V P                  \        P                  R R R. R4      pV P                  V^ ,          P                  RR.4       V P                  V^,          P                  R.4       V P                  VP
                  R4       V P                  VP                  R4       R# )	z (foo) (bar) "bob"(bird)r4  r   r@   r   birdr+  r5  Nr5   r   r-  r   r)   r  r.  r/  s   & r   -test_get_quoted_string_with_multiple_comments8TestParser.test_get_quoted_string_with_multiple_comments  s    f66&(BGB 	A%8A&2U+)4r   c                $   V P                  \        P                  R R R\        P                  .R4      pV P                  V^ ,          P                  R.4       V P                  VP                  R4       V P                  VP                  R4       R# )z
 (
) "bob" bobr   
r+   "bob"N	r5   r   r-  r   r   r   r)   r  r.  r/  s   & r   /test_get_quoted_string_non_printable_in_comment:TestParser.test_get_quoted_string_non_printable_in_comment  ss    f66_f**+R1 	A&2U+(3r   c                $   V P                  \        P                  R R R\        P                  .R4      pV P                  V^ ,          P                  R.4       V P                  VP                  R4       V P                  VP                  R4       R# )z	 (a) "a" ar   r  zaz "a"NrE  r/  s   & r   0test_get_quoted_string_non_printable_in_qcontent;TestParser.test_get_quoted_string_non_printable_in_qcontent  ss    f66NH**+R1 	A#/W-*5r   c                   V P                  \        P                  R R R. R4      pV P                  V^ ,          P                  R.4       V P                  VP
                  R4       V P                  VP                  R4       R# )z (a) "foo  bar "z
 foo  bar r   r  z	foo  bar z "foo  bar "Nr>  r/  s   & r   "test_get_quoted_string_internal_ws-TestParser.test_get_quoted_string_internal_ws   sk    f66 2LB 	A#/[1.9r   c                l   V P                  \        P                  R RR\        P                  .R4      pV P                  V^ ,          P                  R.4       V P                  V^,          P                  R.4       V P                  VP                  R4       V P                  VP                  R4       R# )z (a) "bob" (az (a) "bob" (a)r4  r   r  r+  r5  N	r5   r   r-  r   rv   r   r)   r  r.  r/  s   & r   -test_get_quoted_string_header_ends_in_comment8TestParser.test_get_quoted_string_header_ends_in_comment(  s    f66-w++,b2 	A#/A#/U+)4r   c                $   V P                  \        P                  R RR\        P                  .R4      pV P                  V^ ,          P                  R.4       V P                  VP                  R4       V P                  VP                  R4       R# )z	 (a) "bobz
 (a) "bob"rB  r   r  r+  rD  NrP  r/  s   & r   .test_get_quoted_string_header_ends_in_qcontent9TestParser.test_get_quoted_string_header_ends_in_qcontent1  ss    f66v++,b2 	A#/U+(3r   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; iz (foo) Nr_   r   r`   r   r-  rC   s   &r   'test_get_quoted_string_cfws_only_raises2TestParser.test_get_quoted_string_cfws_only_raises9  s6    v6677$$Y/ 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z	 (ab) xyzNrX  rC   s   &r   'test_get_quoted_string_no_quoted_string2TestParser.test_get_quoted_string_no_quoted_string=  s6    v6677$$[1 8777rd   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  VP
                  R4       R# )z	 "bob" feez	 "bob" r4  feer+  r5  Nr9  r/  s   & r   )test_get_quoted_string_qs_ends_at_noncfws4TestParser.test_get_quoted_string_qs_ends_at_noncfwsA  sM    f66K"e=U+)4r   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       R# )r+  r   atomN)r5   r   get_atomr   r   r   rc  s   & r   test_get_atom_onlyTestParser.test_get_atom_onlyI  s7    5%R)&1r   c                N    V P                  \        P                  R R R. R4       R# )z	 bob  r4  r   Nr5   r   rd  rC   s   &r   test_get_atom_with_wsp!TestParser.test_get_atom_with_wspN  s!    
GR	5r   c                    V P                  \        P                  R R R. R4      pV P                  V^ ,          ^,          P                  R4       V P                  V^,          ^ ,          P                  R4       R# )z (foo) bob(bar)r4  r   r@   r   N)r5   r   rd  r   r  re  s   & r   #test_get_atom_with_comments_and_wsp.TestParser.test_get_atom_with_comments_and_wspR  sa    0'2rCa++U3a++U3r   c                    V P                  \        P                  R R R. R4      pV P                  V^ ,          P                  RR.4       V P                  V^,          P                  R.4       R# )z (foo) (bar) bob(bird)r4  r   r@   r   r=  Nr5   r   rd  r   r)   re  s   & r   $test_get_atom_with_multiple_comments/TestParser.test_get_atom_with_multiple_commentsX  sa    $&>B 	a))E5>:a))F84r   c                    V P                  \        P                  R R R\        P                  .R4      pV P                  V^ ,          P                  R.4       R# )z (
) bobrB  r   rC  Nr5   r   rd  r   r   r   r)   re  s   & r   &test_get_atom_non_printable_in_comment1TestParser.test_get_atom_non_printable_in_comment_  sK    =&**+R1 	a))F84r   c                    V P                  \        P                  R R R\        P                  .R4      pV P                  V^ ,          P                  R.4       R# )z (a) arI  r   r  Nrt  re  s   & r   $test_get_atom_non_printable_in_atext/TestParser.test_get_atom_non_printable_in_atexte  sK    ,**+R1 	a))C51r   c                    V P                  \        P                  R RR\        P                  .R4      pV P                  V^ ,          P                  R.4       V P                  V^,          P                  R.4       R# )z (a) bob (az (a) bob (a)r4  r   r  N)r5   r   rd  r   rv   r   r)   re  s   & r   $test_get_atom_header_ends_in_comment/TestParser.test_get_atom_header_ends_in_commentk  sg    >7++,b2 	a))C51a))C51r   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z (ab) Nr_   r   r`   r   rd  rC   s   &r   test_get_atom_no_atom TestParser.test_get_atom_no_atomr  s4    v6677OOH% 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z (ab) @Nr~  rC   s   &r   $test_get_atom_no_atom_before_special/TestParser.test_get_atom_no_atom_before_specialv  s4    v6677OOI& 8777rd   c                    V P                  \        P                  R RR. R4      pV P                  V^ ,          P                  R.4       V P                  V^,          P                  R.4       R# )z (foo) bob(bar)  @bangz (foo) bob(bar)  r4  z@bangr@   r   Nrp  re  s   & r   "test_get_atom_atom_ends_at_special-TestParser.test_get_atom_atom_ends_at_specialz  s]    $&97BQa))E73a))E73r   c                N    V P                  \        P                  R RR. R4       R# )z	bob  fredzbob  zbob fredNri  rC   s   &r   "test_get_atom_atom_ends_at_noncfws-TestParser.test_get_atom_atom_ends_at_noncfws  s!    &"f	6r   c                N    V P                  \        P                  R RR. R4       R# z=?utf-8?q?=20bob?=rB  r   Nri  rC   s   &r   test_get_atom_rfc2047_atom%TestParser.test_get_atom_rfc2047_atom  s!     &&"b	:r   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        V4      ^4       R# )zfoo.bar.bangr   zdot-atom-textN)r5   r   get_dot_atom_textr   r   lenr   dot_atom_texts   & r   test_get_dot_atom_text!TestParser.test_get_dot_atom_text  sQ    (()A)ANNBD11?C]+Q/r   c                N    V P                  \        P                  R R R . R4      pR# r   r5   r   r  r  s   & r   )test_get_dot_atom_text_lone_atom_is_valid4TestParser.test_get_dot_atom_text_lone_atom_is_valid  s%    (()A)A5%R)r   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z.foo.barNr_   r   r`   r   r  rC   s   &r   ,test_get_dot_atom_text_raises_on_leading_dot7TestParser.test_get_dot_atom_text_raises_on_leading_dot  6    v6677$$Z0 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)zfoo.bar.Nr  rC   s   &r   -test_get_dot_atom_text_raises_on_trailing_dot8TestParser.test_get_dot_atom_text_raises_on_trailing_dot  r  rd   c                   V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       V P                  \        P                  4      ;_uu_ 4        \        P                  ! R4       RRR4       V P                  \        P                  4      ;_uu_ 4        \        P                  ! R4       RRR4       R#   + '       g   i     L; i  + '       g   i     Lk; i  + '       g   i     R# ; i)z foo.barNz@foo.barz	"foo.bar"r  rC   s   &r   2test_get_dot_atom_text_raises_on_leading_non_atext=TestParser.test_get_dot_atom_text_raises_on_leading_non_atext  s    v6677$$Z0 8v6677$$Z0 8v6677$$[1 87	 8777777#   C.C(4C;C%	(C8	;D	c                N    V P                  \        P                  R RR. R4      pR# r  r  r  s   & r   .test_get_dot_atom_text_trailing_text_preserved9TestParser.test_get_dot_atom_text_trailing_text_preserved  s%    (()A)AueR1r   c                N    V P                  \        P                  R RR. R4      pR# )zfoo .barr@   z .barNr  r  s   & r   ,test_get_dot_atom_text_trailing_ws_preserved7TestParser.test_get_dot_atom_text_trailing_ws_preserved  s%    (()A)Aub'3r   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        V4      ^4       R# )zfoo.bar.bingr   zdot-atomN)r5   r   get_dot_atomr   r   r  )r   dot_atoms   & r   test_get_dot_atom_only!TestParser.test_get_dot_atom_only  sP    ##F$7$7NNBD,,j9X*r   c                N    V P                  \        P                  R R R. R4       R# )z	  foo.bar.bing   foo.bar.bing r   Nr5   r   r  rC   s   &r   test_get_dot_atom_with_wsp%TestParser.test_get_dot_atom_with_wsp  s&    ,, "68H"b	Rr   c                N    V P                  \        P                  R R R. R4       R# )z (sing)  foo.bar.bing (here) r  r   Nr  rC   s   &r   'test_get_dot_atom_with_comments_and_wsp2TestParser.test_get_dot_atom_with_comments_and_wsp  s%    ,,+-L "b	*r   c                N    V P                  \        P                  R RR. R4       R# )z (sing)  foo.bar .bing (here) z (sing)  foo.bar z	 foo.bar z.bing (here) Nr  rC   s   &r   %test_get_dot_atom_space_ends_dot_atom0TestParser.test_get_dot_atom_space_ends_dot_atom  s%    ,,,.AR	2r   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; irW  r_   r   r`   r   r  rC   s   &r    test_get_dot_atom_no_atom_raises+TestParser.test_get_dot_atom_no_atom_raises  s6    v6677	* 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z (foo) .barNr  rC   s   &r   $test_get_dot_atom_leading_dot_raises/TestParser.test_get_dot_atom_leading_dot_raises  s6    v6677. 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z	bar..bangNr  rC   s   &r   !test_get_dot_atom_two_dots_raises,TestParser.test_get_dot_atom_two_dots_raises  s6    v6677, 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z (foo) bar.bang. fooNr  rC   s   &r   %test_get_dot_atom_trailing_dot_raises0TestParser.test_get_dot_atom_trailing_dot_raises  s7    v6677 67 8777rd   c                N    V P                  \        P                  R RR. R4       R# r  r  rC   s   &r   test_get_dot_atom_rfc2047_atom)TestParser.test_get_dot_atom_rfc2047_atom  s#    ,, &&"b	:r   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  V^ ,          P                  R4       R# )z (foo) bar (bang) :ahz (foo) bar (bang) r  z:ahrc  r  N)r5   r   get_wordr   r   r   words   & r   test_get_word_atom_yields_atom)TestParser.test_get_word_atom_yields_atom  sS    #%97BO&1a++V4r   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z(Recipients list suppressedN)r_   r   r`   r   r  rC   s   &r   test_get_word_all_CFWS!TestParser.test_get_word_all_CFWS  s7     v6677OO9: 8777rd   c                J   V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  V^ ,          P                  R4       V P                  V^ ,          P
                  R4       V P                  VP                  R4       R# )z"bar " (bang) ahz"bar " (bang) r   ahr,  r  r   N)r5   r   r  r   r   r   r  r  s   & r   test_get_word_qs_yields_qs%TestParser.test_get_word_qs_yields_qs  s     0'2tE/:a++-ABa/v.r   c                N    V P                  \        P                  R RR. R4       R# )zfoo.r@   .N)r5   r   r  rC   s   &r   test_get_word_ends_at_dot$TestParser.test_get_word_ends_at_dot  s!    E5"c	+r   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       R# )""Fred A. Johnson" is his name, oh."Fred A. Johnson" is his nameFred A. Johnson is his name, oh.phraseN)r5   r   
get_phraser   r   r   r  s   & r   test_get_phrase_simple!TestParser.test_get_phrase_simple  sA    !!&"3"30+) 	**H5r   c                    V P                  \        P                  R RR. R4      pV P                  V^ ,          ^ ,          P                  R.4       V P                  V^ ,          ^,          P                  R.4       R# ). (A) bird (in (my|your)) "hand  " is messy	<>	+ (A) bird (in (my|your)) "hand  " is messy	z bird hand   is messy <>	Ain (my|your)N)r5   r   r  r   r)   r  s   & r   test_get_phrase_complex"TestParser.test_get_phrase_complex  sl    !!&"3"3>:$ 	1..61..0@Ar   c                    V P                  \        P                  R R R\        P                  .^,          R4      pV P                  \        V4      ^4       V P                  V^,          P                  R.4       R# )Fred A.(weird).O JohnsonFred A. .O Johnsonr   weirdNr5   r   r  r   ObsoleteHeaderDefectr   r  r)   r  s   & r   test_get_phrase_obsolete#TestParser.test_get_phrase_obsolete  si    !!&"3"3&& (()!+ 	Va(++gY7r   c           	     $   V P                  \        P                  R R R\        P                  .\        P
                  .^,          ,           R4      pV P                  \        V4      ^4       V P                  V^ ,          P                  R.4       R# )(even weirder).namez .namer   even weirderN)	r5   r   r  r   rv   r  r   r  r)   r  s   & r   +test_get_phrase_pharse_must_start_with_word6TestParser.test_get_phrase_pharse_must_start_with_word  sx    !!&"3"3!!''(F,G,G+H+JJ 	Va(++n-=>r   c                    V P                  \        P                  R RR\        P                  .^,          R4      pV P                  \        V4      ^4       V P                  V^,          P                  R.4       R# ))simple phrase.(with trailing comment):boo%simple phrase.(with trailing comment)zsimple phrase. :boowith trailing commentNr  r  s   & r   $test_get_phrase_ending_with_obsolete/TestParser.test_get_phrase_ending_with_obsolete  sk    !!&"3"373(()!+ 	Va(++.E-FGr   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; irW  )r_   r   r`   r   r  rC   s   &r   get_phrase_cfws_only_raises&TestParser.get_phrase_cfws_only_raises#  s6    v6677i( 8777rd   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  VP
                  R4       R# )zdinsdale@python.orgdinsdale@python.org
local-partNr5   r   get_local_partr   r   
local_partr   r  s   & r   test_get_local_part_simple%TestParser.test_get_local_part_simple)  sR    %%f&;&;!:z2}N
..=..
;r   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       R# )zFred.A.Johnson@python.orgFred.A.Johnsonr  Nr5   r   r  r   r  r  s   & r   test_get_local_part_with_dot'TestParser.test_get_local_part_with_dot/  sB    %%f&;&;'
 	..0@Ar   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       R# )z Fred.A.Johnson  @python.orgz Fred.A.Johnson   Fred.A.Johnson r  r  Nr  r  s   & r   #test_get_local_part_with_whitespace.TestParser.test_get_local_part_with_whitespace8  sB    %%f&;&;*
 	..0@Ar   c                2   V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  V^ ,          ^ ,          P
                  R.4       V P                  V^ ,          ^,          P
                  R.4       R# )z/ (foo) Fred.A.Johnson (bar (bird))  @python.orgz$ (foo) Fred.A.Johnson (bar (bird))  r  r  r  r@   
bar (bird)Nr5   r   r  r   r  r)   r  s   & r   test_get_local_part_with_cfws(TestParser.test_get_local_part_with_cfwsA  s    %%f&;&;=2
 	..0@AAq)22UG<Aq)22\NCr   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  VP
                  R4       R# )z"dinsdale"@python.orgz
"dinsdale"r  r	  r  Nr
  r  s   & r   !test_get_local_part_simple_quoted,TestParser.test_get_local_part_simple_quotedL  sR    %%f&;&;#\<]T
..=..
;r   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       R# )z"Fred.A.Johnson"@python.orgz"Fred.A.Johnson"r  r  Nr  r  s   & r   #test_get_local_part_with_quoted_dot.TestParser.test_get_local_part_with_quoted_dotR  sB    %%f&;&;)
 	..0@Ar   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       R# )z "Fred A. Johnson"  @python.orgz "Fred A. Johnson"  z "Fred A. Johnson" r  zFred A. JohnsonNr  r  s   & r   *test_get_local_part_quoted_with_whitespace5TestParser.test_get_local_part_quoted_with_whitespace[  sB    %%f&;&;-"!
 	..0ABr   c                2   V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  V^ ,          ^ ,          P
                  R.4       V P                  V^ ,          ^,          P
                  R.4       R# )z4 (foo) " Fred A. Johnson " (bar (bird))  @python.orgz) (foo) " Fred A. Johnson " (bar (bird))  z " Fred A. Johnson " r  z Fred A. Johnson r@   r  Nr  r  s   & r   $test_get_local_part_quoted_with_cfws/TestParser.test_get_local_part_quoted_with_cfwsd  s    %%f&;&;B7#
 	..0CDAq)22UG<Aq)22\NCr   c                    V P                  \        P                  R RR\        P                  .R4      pV P                  VP                  R4       R# )zFred. A.Johnson@python.orgzFred. A.Johnsonr  r  Nr5   r   r  r   r  r   r  r  s   & r   #test_get_local_part_simple_obsolete.TestParser.test_get_local_part_simple_obsoletep  sK    %%f&;&;((()
 	..0@Ar   c                    V P                  \        P                  R RR\        P                  .R4      pV P                  VP                  R4       R# )zA (foo )Fred (bar).(bird) A.(sheep)Johnson."and  dogs "@python.orgz6 (foo )Fred (bar).(bird) A.(sheep)Johnson."and  dogs "z Fred . A. Johnson.and  dogs r  zFred.A.Johnson.and  dogs Nr+  r  s   & r   &test_get_local_part_complex_obsolete_11TestParser.test_get_local_part_complex_obsolete_1y  sK    %%f&;&;OD+(()
 	..0KLr   c                    V P                  \        P                  R RR\        P                  .^,          R4      pV P                  VP                  R4       R# )z@ (foo )Fred (bar).(bird) A.(sheep)Johnson "and  dogs"@python.orgz5 (foo )Fred (bar).(bird) A.(sheep)Johnson "and  dogs"z Fred . A. Johnson and  dogsr  zFred.A.Johnson and  dogsNr5   r   r  r   rv   r   r  r  s   & r   ,test_get_local_part_complex_obsolete_invalid7TestParser.test_get_local_part_complex_obsolete_invalid  sP    %%f&;&;NC*''(*
 	..0JKr   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; ir   r_   r   r`   r   r  rC   s   &r    test_get_local_part_empty_raises+TestParser.test_get_local_part_empty_raises  6    v6677!!"% 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; irW  r6  rC   s   &r   "test_get_local_part_no_part_raises-TestParser.test_get_local_part_no_part_raises  s6    v6677!!), 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z (foo) @python.orgNr6  rC   s   &r   *test_get_local_part_special_instead_raises5TestParser.test_get_local_part_special_instead_raises  s7    v6677!!"67 8777rd   c                    V P                  \        P                  R RR\        P                  .^,          R4      pV P                  VP                  R4       R# )z borris.@python.orgz borris.r  borris.Nr2  r  s   & r    test_get_local_part_trailing_dot+TestParser.test_get_local_part_trailing_dot  O    %%f&;&;!''(*
 	..	:r   c                    V P                  \        P                  R RR\        P                  .^,          R4      pV P                  VP                  R4       R# )z borris. @python.orgz	 borris. r  rA  Nr2  r  s   & r   (test_get_local_part_trailing_dot_with_ws3TestParser.test_get_local_part_trailing_dot_with_ws  sO    %%f&;&;"''(*
 	..	:r   c                    V P                  \        P                  R RR\        P                  .^,          R4      pV P                  VP                  R4       R# )z.borris@python.org.borrisr  Nr2  r  s   & r   test_get_local_part_leading_dot*TestParser.test_get_local_part_leading_dot  sO    %%f&;&; ''(*
 	..	:r   c                    V P                  \        P                  R RR\        P                  .^,          R4      pV P                  VP                  R4       R# )z .borris@python.orgz .borrisr  rI  Nr2  r  s   & r   (test_get_local_part_leading_dot_after_ws3TestParser.test_get_local_part_leading_dot_after_ws  rD  r   c                    V P                  \        P                  R RR\        P                  .^,          R4      pV P                  VP                  R4       R# )z  borris.(foo).natasha@python.orgz borris.(foo).natashaz borris. .natashar  zborris..natashaNr2  r  s   & r   %test_get_local_part_double_dot_raises0TestParser.test_get_local_part_double_dot_raises  sP    %%f&;&;.#''(*
 	..0ABr   c                    V P                  \        P                  R RR\        P                  .^,          R4      pV P                  VP                  R4       R# )""example" example"@example.comz""example" example"example example@example.comNr2  r  s   & r   /test_get_local_part_quoted_strings_in_atom_list:TestParser.test_get_local_part_quoted_strings_in_atom_list  sP    %%f&;&;-!''(*
 	..0ABr   c                    V P                  \        P                  R RR\        P                  .^,          R4      pV P                  VP                  R4       R# )z#"\\"example\\" example"@example.comz"\\"example\\" example"z\example\\ examplerU  Nr2  r  s   & r   5test_get_local_part_valid_and_invalid_qp_in_atom_list@TestParser.test_get_local_part_valid_and_invalid_qp_in_atom_list  sP    %%f&;&;2&!''(*
 	..0EFr   c                    V P                  \        P                  R RR\        P                  .R4      pV P                  VP                  R4       R# )u   exámple@example.comu   exámplerU  N)r5   r   r  r   NonASCIILocalPartDefectr   r  r  s   & r   "test_get_local_part_unicode_defect-TestParser.test_get_local_part_unicode_defect  sL     %%f&;&;"++,
 	..
;r   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       R# rX  )r5   r   	get_dtextr   r   r   dtexts   & r   test_get_dtext_onlyTestParser.test_get_dtext_only  r  r   c                    V P                  \        P                  V P                  V P                  V P                  . R 4      pR# r   )r5   r   r`  rfc_dtext_charsra  s   & r   test_get_dtext_all_dtext#TestParser.test_get_dtext_all_dtext  r  r   c                N    V P                  \        P                  R RR. R4       R# r  r5   r   r`  rC   s   &r   #test_get_dtext_two_words_gets_first.TestParser.test_get_dtext_two_words_gets_first  r  r   c                N    V P                  \        P                  R RR. R4       R# r  rj  rC   s   &r   &test_get_dtext_following_wsp_preserved1TestParser.test_get_dtext_following_wsp_preserved  r  r   c                    V P                  \        P                  R RR\        P                  .R4      pV P                  VP                  ^ ,          P                  ^ ,          R4       R# )zfoo bar]rH  ]rI  N)r5   r   r`  r   r   r   r-   rJ  ra  s   & r   test_get_dtext_non_printables(TestParser.test_get_dtext_non_printables  r  r   c                l    V P                  \        P                  R RR\        P                  .R4      pR# )zfoo\]\[\\bar\b\e\l\lzfoo][\barbellr   N)r5   r   r`  r   r  r  s   & r   test_get_dtext_with_qp!TestParser.test_get_dtext_with_qp  s2      !1!1!8!1!1"("="=!>!#%r   c                N    V P                  \        P                  R RR. R4       R# )zfoo]r@   rq  Nrj  rC   s   &r   'test_get_dtext_up_to_close_bracket_only2TestParser.test_get_dtext_up_to_close_bracket_only  #    ))ub#	7r   c                N    V P                  \        P                  R RR. R4       R# )zfoo  ]r@   z  ]Nrj  rC   s   &r   1test_get_dtext_wsp_before_close_bracket_preserved<TestParser.test_get_dtext_wsp_before_close_bracket_preserved  #    )) %E	;r   c                N    V P                  \        P                  R RR. R4       R# )zfoo]barr@   z]barNrj  rC   s   &r   %test_get_dtext_close_bracket_mid_word0TestParser.test_get_dtext_close_bracket_mid_word  r  r   c                N    V P                  \        P                  R RR. R4       R# )zfoo[r@   [Nrj  rC   s   &r   &test_get_dtext_up_to_open_bracket_only1TestParser.test_get_dtext_up_to_open_bracket_only  rz  r   c                N    V P                  \        P                  R RR. R4       R# )zfoo  [r@   z  [Nrj  rC   s   &r   0test_get_dtext_wsp_before_open_bracket_preserved;TestParser.test_get_dtext_wsp_before_open_bracket_preserved  r~  r   c                N    V P                  \        P                  R RR. R4       R# )zfoo[barr@   z[barNrj  rC   s   &r   $test_get_dtext_open_bracket_mid_word/TestParser.test_get_dtext_open_bracket_mid_word  r  r   c                N    V P                  \        P                  R RR. R 4       R# )r  r   Nrj  rC   s   &r    test_get_dtext_open_bracket_only+TestParser.test_get_dtext_open_bracket_only  #    ))RR	.r   c                N    V P                  \        P                  R RR. R 4       R# )rq  r   Nrj  rC   s   &r   !test_get_dtext_close_bracket_only,TestParser.test_get_dtext_close_bracket_only  r  r   c                N    V P                  \        P                  R R R . R 4       R# r   rj  rC   s   &r   test_get_dtext_emptyTestParser.test_get_dtext_empty#  s#    ))BB	,r   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R 4       V P                  VP                  R4       R# )[127.0.0.1]r   zdomain-literal	127.0.0.1N)r5   r   get_domain_literalr   r   domainipr   domain_literals   & r   test_get_domain_literal_only'TestParser.test_get_domain_literal_only)  sn    *.*:*:6;T;T - - - " "+$ 	224DE..>**K8r   c                    V P                  \        P                  R R R. R4      pV P                  VP                  R4       V P                  VP
                  R4       R# )z[  127.0.0.1	 ]z[ 127.0.0.1 ]r   r  r  Nr5   r   r  r   r  r  r  s   & r   (test_get_domain_literal_with_internal_ws3TestParser.test_get_domain_literal_with_internal_ws4  sW    ))&*C*C 2 2 / " "$ 	..>**K8r   c                    V P                  \        P                  R R R. R4      pV P                  VP                  R4       V P                  VP
                  R4       R# )z(foo)[  127.0.0.1] (bar)z [ 127.0.0.1] r   r  r  Nr  r  s   & r   -test_get_domain_literal_with_surrounding_cfws8TestParser.test_get_domain_literal_with_surrounding_cfws>  sW    ))&*C*C : : 0 " "$ 	..>**K8r   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; ir  Nr_   r   r`   r   r  rC   s   &r   ,test_get_domain_literal_no_start_char_raises7TestParser.test_get_domain_literal_no_start_char_raisesH  s6    v6677%%h/ 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z(foo) @Nr  rC   s   &r   ;test_get_domain_literal_no_start_char_before_special_raisesFTestParser.test_get_domain_literal_no_start_char_before_special_raisesL  s6    v6677%%i0 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z(foo) [abc[@Nr  rC   s   &r   <test_get_domain_literal_bad_dtext_char_before_special_raisesGTestParser.test_get_domain_literal_bad_dtext_char_before_special_raisesP  s6    v6677%%n5 8777rd   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R 4       R# )example.comr   r  Nr5   r   
get_domainr   r   r  r   r  s   & r   #test_get_domain_regular_domain_only.TestParser.test_get_domain_regular_domain_onlyV  U    !!&"3"3"/"/"/"$"$& 	**H56r   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R 4       R# )r  r   r  Nr  r  s   & r   #test_get_domain_domain_literal_only.TestParser.test_get_domain_domain_literal_only`  r  r   c                    V P                  \        P                  R R R. R4      pV P                  VP                  R4       R# )z(foo) example.com(bar)	 example.com r   r  Nr5   r   r  r   r  r  s   & r   test_get_domain_with_cfws$TestParser.test_get_domain_with_cfwsj  s?    !!&"3"3"<"<"1"$"$& 	6r   c                    V P                  \        P                  R R R. R4      pV P                  VP                  R4       R# )(foo)[127.0.0.1]	(bar) [127.0.0.1] r   r  Nr  r  s   & r   (test_get_domain_domain_literal_with_cfws3TestParser.test_get_domain_domain_literal_with_cfwss  s?    !!&"3"3";";"1"$"$& 	6r   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       R# )z(foo)example.com	(bar), nextz(foo)example.com	(bar)r  , nextr  Nr  r  s   & r   0test_get_domain_domain_with_cfws_ends_at_special;TestParser.test_get_domain_domain_with_cfws_ends_at_special|  ?    !!&"3"3"A";"1"$"*, 	6r   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       R# )z(foo)[127.0.0.1]	(bar), nextr  r  r  r  Nr  r  s   & r   8test_get_domain_domain_literal_with_cfws_ends_at_specialCTestParser.test_get_domain_domain_literal_with_cfws_ends_at_special  r  r   c                    V P                  \        P                  R R R\        P                  .R4      pV P                  VP                  R4       R# )z(foo) example . (bird)com(bar)	z example . com r   r  N)r5   r   r  r   r  r   r  r  s   & r   test_get_domain_obsolete#TestParser.test_get_domain_obsolete  sH    !!&"3"3"D"D"3#)#>#>"?"$& 	6r   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; ir   r_   r   r`   r   r  rC   s   &r   test_get_domain_empty_raises'TestParser.test_get_domain_empty_raises  s6    v6677b! 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z  (foo)	Nr  rC   s   &r   "test_get_domain_no_non_cfws_raises-TestParser.test_get_domain_no_non_cfws_raises  6    v6677k* 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z  (foo)	, brokenNr  rC   s   &r   test_get_domain_no_atom_raises)TestParser.test_get_domain_no_atom_raises  s7    v667712 8777rd   c                .   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       V P                  VP                  R 4       R# )dinsdale@example.comr   z	addr-specr  r  N)r5   r   get_addr_specr   r   r  r  	addr_specr   r  s   & r   test_get_addr_spec_normal$TestParser.test_get_addr_spec_normal  s    $$V%9%9$:$:$:$&$&(	 	--{;--z:))=9,,.DEr   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R 4       R# )zdinsdale@[127.0.0.1]r   r  r  Nr5   r   r  r   r  r  r  r  s   & r   &test_get_addr_spec_with_doamin_literal1TestParser.test_get_addr_spec_with_doamin_literal  sn    $$V%9%9$:$:$:$&$&(	 	--z:))=9,,.DEr   c                    V P                  \        P                  R R R. R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       R# )z-(foo) dinsdale(bar)@ (bird) example.com (bog)z dinsdale@example.com r   r  r  r  Nr  r  s   & r   test_get_addr_spec_with_cfws'TestParser.test_get_addr_spec_with_cfws  sn    $$V%9%9??(	 	--z:))=9,,.DEr   c                    V P                  \        P                  R R R. R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       R# )z0(foo) "roy a bug"(bar)@ (bird) example.com (bog) "roy a bug"@example.com r   	roy a bugr  "roy a bug"@example.comNr  r  s   & r   /test_get_addr_spec_with_qouoted_string_and_cfws:TestParser.test_get_addr_spec_with_qouoted_string_and_cfws  sn    $$V%9%9BB+	 	--{;))=9,,.GHr   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       R# )z7(foo) "roy a bug"(bar)@ (bird) example.com (bog) , nextz1(foo) "roy a bug"(bar)@ (bird) example.com (bog) r  r  r  r  r  Nr  r  s   & r   "test_get_addr_spec_ends_at_special-TestParser.test_get_addr_spec_ends_at_special  sn    $$V%9%9IC+	 	--{;))=9,,.GHr   c                "   V P                  \        P                  R R R\        P                  .^,          R4      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       R# rS  zexample example@example.comr   rT  r  z"example example"@example.comN)	r5   r   r  r   rv   r   r  r  r  r  s   & r   .test_get_addr_spec_quoted_strings_in_atom_list9TestParser.test_get_addr_spec_quoted_strings_in_atom_list  s}    $$V%9%9--)''(*	 	--/@A))=9,,.MNr   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R 4       R# )zstar.a.star@example.comr   zstar.a.starr  Nr  r  s   & r   test_get_addr_spec_dot_atom&TestParser.test_get_addr_spec_dot_atom  sn    $$V%9%9%%%	 	--}=))=9,,.GHr   c                   V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       V P                  \        P                  4      ;_uu_ 4        \        P                  ! R4       RRR4       V P                  \        P                  4      ;_uu_ 4        \        P                  ! R4       RRR4       R#   + '       g   i     L; i  + '       g   i     Lk; i  + '       g   i     R# ; i)zstar@a.star@example.comNzstar@a@example.comzstar@172.17.0.1@example.com)r_   r   r`   r   r  rC   s   &r   #test_get_addr_spec_multiple_domains.TestParser.test_get_addr_spec_multiple_domains  s    v6677  !:; 8 v6677  !56 8 v6677  !>? 87 87 87 877r  c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  RR.4       R# )z@example.com, @two.example.com:r   	obs-router  two.example.comN)r5   r   get_obs_router   r   domainsr   	obs_routes   & r   test_get_obs_route_simple$TestParser.test_get_obs_route_simple   s]    $$V%9%9---	 	--{;**]<M,NOr   c                    V P                  \        P                  R R R\        P                  .R4      pV P                  VP                  R4       V P                  VP                  RR.4       R# )z?(foo),, (blue)@example.com (bar),@two.(foo) example.com (bird):z% ,, @example.com ,@two. example.com :r   r  r  r   N)r5   r   r  r   r  r   r   r  r  s   & r   test_get_obs_route_complex%TestParser.test_get_obs_route_complex
  sf    $$V%9%9MM3(()	 	--{;**]<M,NOr   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z(foo) @example.com,Nr_   r   r`   r   r  rC   s   &r   -test_get_obs_route_no_route_before_end_raises8TestParser.test_get_obs_route_no_route_before_end_raises  s7    v6677  !67 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z(foo) @example.com, (foo) Nr  rC   s   &r   .test_get_obs_route_no_route_before_end_raises29TestParser.test_get_obs_route_no_route_before_end_raises2  s7    v6677  !=> 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z(foo) [abc],Nr  rC   s   &r   1test_get_obs_route_no_route_before_special_raises<TestParser.test_get_obs_route_no_route_before_special_raises  s6    v6677  0 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z(foo) @example.com [abc],Nr  rC   s   &r   2test_get_obs_route_no_route_before_special_raises2=TestParser.test_get_obs_route_no_route_before_special_raises2   s7    v6677  !<= 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)@Nr  rC   s   &r   ,test_get_obs_route_no_domain_after_at_raises7TestParser.test_get_obs_route_no_domain_after_at_raises$  s6    v6677  % 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z@example.com, @Nr  rC   s   &r   -test_get_obs_route_no_domain_after_at_raises28TestParser.test_get_obs_route_no_domain_after_at_raises2(  s7    v6677  !23 8777rd   c                d   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )<dinsdale@example.com>r   
angle-addrr  r  r  N
r5   r   get_angle_addrr   r   r  r  assertIsNonerouter  r   
angle_addrs   & r   test_get_angle_addr_simple%TestParser.test_get_angle_addr_simple.  s    %%f&;&;$$$
 	..=..
;**M:***+--/EFr   c                ~   V P                  \        P                  R R R \        P                  .R4      pV P                  VP                  R4       V P                  VP                  4       V P                  VP                  4       V P                  VP                  4       V P                  VP                  R 4       R# )<>r   r   N)r5   r   r"  r   rv   r   r   r#  r  r  r$  r  r%  s   & r   test_get_angle_addr_empty$TestParser.test_get_angle_addr_empty;  s    %%f&;&;''(
 	..=*//0*++,***+--t4r   c                d   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )z<""@example.com>r   r   r  z""@example.comNr!  r%  s   & r   "test_get_angle_addr_qs_only_quotes-TestParser.test_get_angle_addr_qs_only_quotesH  s    %%f&;&;
 	..=..3**M:***+--/?@r   c                d   V P                  \        P                  R R R. R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )z" (foo) <dinsdale@example.com>(bar)z <dinsdale@example.com> r   r   r  r  r  Nr!  r%  s   & r   test_get_angle_addr_with_cfws(TestParser.test_get_angle_addr_with_cfwsU  s    %%f&;&;00&
 	..=..
;**M:***+--/EFr   c                ,   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  4       V P                  VP                  R4       R# )z<"Fred Perfect"@[127.0.0.1]>r   zFred Perfectr  z"Fred Perfect"@[127.0.0.1]N	r5   r   r"  r   r  r  r#  r$  r  r%  s   & r   )test_get_angle_addr_qs_and_domain_literal4TestParser.test_get_angle_addr_qs_and_domain_literalb  s    %%f&;&;***
 	..?**M:***+--/KLr   c                ,   V P                  \        P                  R R R. R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  4       V P                  VP                  R4       R# )z!<(foo) dinsdale@example.com(bar)>z< dinsdale@example.com >r   r  r  r  Nr4  r%  s   & r   !test_get_angle_addr_internal_cfws,TestParser.test_get_angle_addr_internal_cfwsn  s    %%f&;&;//&
 	..
;**M:***+--/EFr   c                P   V P                  \        P                  R R R\        P                  .R4      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  RR.4       V P                  VP                  R4       R# )zI(foo)<@example.com, (bird) @two.example.com: dinsdale@example.com> (bar) z8 <@example.com, @two.example.com: dinsdale@example.com> r   r  r  r   r  N)
r5   r   r"  r   r  r   r  r  r$  r  r%  s   & r   test_get_angle_addr_obs_route(TestParser.test_get_angle_addr_obs_routez  s    %%f&;&;WWF(()
 	..
;**M:))M;L+MN--/EFr   c                J   V P                  \        P                  R RR\        P                  .R4      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )z<dinsdale@example.comr  r   r  r  r  Nr5   r   r"  r   rv   r   r  r  r#  r$  r  r%  s   & r   )test_get_angle_addr_missing_closing_angle4TestParser.test_get_angle_addr_missing_closing_angle  s    %%f&;&;#$$''(
 	..
;**M:***+--/EFr   c                J   V P                  \        P                  R RR\        P                  .R4      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )z<dinsdale@example.com (foo)z<dinsdale@example.com (foo)>z<dinsdale@example.com >r   r  r  r  Nr>  r%  s   & r   3test_get_angle_addr_missing_closing_angle_with_cfws>TestParser.test_get_angle_addr_missing_closing_angle_with_cfws  s    %%f&;&;)*%''(
 	..
;**M:***+--/EFr   c                ,   V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  4       V P                  VP                  R4       R# )z"<dinsdale@example.com> (foo), nextz<dinsdale@example.com> (foo)z<dinsdale@example.com> r  r  r  r  Nr4  r%  s   & r   #test_get_angle_addr_ends_at_special.TestParser.test_get_angle_addr_ends_at_special  s    %%f&;&;0*%
 	..
;**M:***+--/EFr   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; ir   r_   r   r`   r   r"  rC   s   &r   test_get_angle_addr_empty_raise*TestParser.test_get_angle_addr_empty_raise  r9  rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)<NrH  rC   s   &r   )test_get_angle_addr_left_angle_only_raise4TestParser.test_get_angle_addr_left_angle_only_raise  s6    v6677!!#& 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; ir  rH  rC   s   &r   "test_get_angle_addr_no_angle_raise-TestParser.test_get_angle_addr_no_angle_raise  s6    v6677!!(+ 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z(foo) , nextNrH  rC   s   &r   2test_get_angle_addr_no_angle_before_special_raises=TestParser.test_get_angle_addr_no_angle_before_special_raises  6    v6677!!.1 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)r   NrH  rC   s   &r   #test_get_angle_addr_no_angle_raises.TestParser.test_get_angle_addr_no_angle_raises  s6    v6677!!%( 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z(foo) <, barNrH  rC   s   &r   .test_get_angle_addr_special_after_angle_raises9TestParser.test_get_angle_addr_special_after_angle_raises  rU  rd   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R 4       R# )zFred A Johnsonr   display-nameNr5   r   get_display_namer   r   display_namer   r`  s   & r   test_get_display_name_simple'TestParser.test_get_display_name_simple  sX    ''(?(? 	00.A224DEr   c                    V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  VP
                  R4       R# )r  r  z"Fred A. Johnson is his name"r  r]  r  Nr^  ra  s   & r   test_get_display_name_complex1)TestParser.test_get_display_name_complex1  sX    ''(?(?0++ 	00.A224QRr   c                2   V P                  \        P                  R RR. R4      pV P                  V^ ,          ^ ,          P                  R.4       V P                  V^ ,          ^,          P                  R.4       V P                  VP
                  R4       R# )r  r  z "bird hand   is messy" r  r  r  zbird hand   is messyN)r5   r   r_  r   r)   r`  ra  s   & r   test_get_display_name_complex2)TestParser.test_get_display_name_complex2  s    ''(?(?>:& 	a+44se<a+44~6FG224JKr   c                0   V P                  \        P                  R R R\        P                  .^,          R4      pV P                  \        V4      ^4       V P                  V^,          P                  R.4       V P                  VP                  R4       R# )r  z"Fred A. .O Johnson"r   r  r  N	r5   r   r_  r   r  r   r  r)   r`  ra  s   & r   test_get_display_name_obsolete)TestParser.test_get_display_name_obsolete  s    ''(?(?&&"(()!+ 	\*A.a11G9=224HIr   c           	     \   V P                  \        P                  R R R\        P                  .\        P
                  .^,          ,           R4      pV P                  \        V4      ^4       V P                  V^ ,          P                  R.4       V P                  VP                  R4       R# )r  z ".name"r   r  z.nameN)
r5   r   r_  r   rv   r  r   r  r)   r`  ra  s   & r   1test_get_display_name_pharse_must_start_with_word<TestParser.test_get_display_name_pharse_must_start_with_word  s    ''(?(?!!''(F,G,G+H+JJ 	\*A.a11N3CD22G<r   c                0   V P                  \        P                  R RR\        P                  .^,          R4      pV P                  \        V4      ^4       V P                  V^,          P                  R.4       V P                  VP                  R4       R# )r  r  z"simple phrase." r  r   zsimple phrase.Nrk  ra  s   & r   *test_get_display_name_ending_with_obsolete5TestParser.test_get_display_name_ending_with_obsolete  s    ''(?(?73(()!+ 	\*A.a114K3LM224DEr   c                    V P                  \        P                  R RR\        P                  .R 4      pV P                  VP                  R4       R# )z:Foo r   N)r5   r   r_  r   rv   r   r   ra  s   & r   /test_get_display_name_for_invalid_address_field:TestParser.test_get_display_name_for_invalid_address_field  sJ     ''##Rf8897D 	++R0r   c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )r  r   	name-addrr  r  r  N)r5   r   get_name_addrr   r   r#  r`  r  r  r$  r  r   	name_addrs   & r   "test_get_name_addr_angle_addr_only-TestParser.test_get_name_addr_angle_addr_only  s    $$V%9%9$$$	 	--{;)001--z:))=9)//*,,.DEr   c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )zDinsdale <dinsdale@example.com>r   rx  Dinsdaler  r  r  N)r5   r   ry  r   r   r`  r  r  r#  r$  r  rz  s   & r   test_get_name_addr_atom_name'TestParser.test_get_name_addr_atom_name  s    $$V%9%9---	 	--{;//<--z:))=9)//*,,.DEr   c                d   V P                  \        P                  R R R. R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )z2(foo) Dinsdale (bar) <dinsdale@example.com> (bird)z! Dinsdale <dinsdale@example.com> r   r  r  r  r  N
r5   r   ry  r   r`  r  r  r#  r$  r  rz  s   & r   &test_get_name_addr_atom_name_with_cfws1TestParser.test_get_name_addr_atom_name_with_cfws*  s    $$V%9%9@@/	 	//<--z:))=9)//*,,.DEr   c                   V P                  \        P                  R R R\        P                  .^,          R4      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )z4(foo) Roy.A.Bear (bar) <dinsdale@example.com> (bird)z% "Roy.A.Bear" <dinsdale@example.com> r   
Roy.A.Bearr  r  r  Nr5   r   ry  r   r  r   r`  r  r  r#  r$  r  rz  s   & r   *test_get_name_addr_name_with_cfws_and_dots5TestParser.test_get_name_addr_name_with_cfws_and_dots7  s    $$V%9%9BB3(()!+	 	//>--z:))=9)//*,,.DEr   c                d   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )#"Roy.A.Bear" <dinsdale@example.com>r   r  r  r  r  Nr  rz  s   & r   test_get_name_addr_qs_name%TestParser.test_get_name_addr_qs_nameD  s    $$V%9%9111	 	//>--z:))=9)//*,,.DEr   c                   V P                  \        P                  R R R\        P                  .R4      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )zJohn X.<jxd@example.com>z"John X."<jxd@example.com>r   zJohn X.jxdr  jxd@example.comNr  rz  s   & r   0test_get_name_addr_ending_with_dot_without_space;TestParser.test_get_name_addr_ending_with_dot_without_spaceQ  s    $$V%9%9&&((()	 	//;--u5))=9)//*,,.?@r   c                   V P                  \        P                  R R R\        P                  \        P
                  .R4      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )z. Doe <jxd@example.com>z". Doe" <jxd@example.com>r   z. Doer  r  r  N)r5   r   ry  r   rv   r  r   r`  r  r  r#  r$  r  rz  s   & r   $test_get_name_addr_starting_with_dot/TestParser.test_get_name_addr_starting_with_dot^  s    $$V%9%9%%''')D)DE	 	//9--u5))=9)//*,,.?@r   c                   V P                  \        P                  R R R \        P                  .R4      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R.4       V P                  VP                  R4       R# )z5"Roy.A.Bear" <@two.example.com: dinsdale@example.com>r   r  r  r  r   r  N)r5   r   ry  r   r  r   r`  r  r  r$  r  rz  s   & r   test_get_name_addr_with_route(TestParser.test_get_name_addr_with_routek  s    $$V%9%9CCC(()	 	//>--z:))=9+<*=>,,.DEr   c                d   V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )z)"Roy.A.Bear" <dinsdale@example.com>, nextr  r  r  r  r  r  Nr  rz  s   & r   "test_get_name_addr_ends_at_special-TestParser.test_get_name_addr_ends_at_specialx  s    $$V%9%9711	 	//>--z:))=9)//*,,.DEr   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; ir   r_   r   r`   r   ry  rC   s   &r   test_get_name_addr_empty_raises*TestParser.test_get_name_addr_empty_raises  s6    v6677  $ 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; irW  r  rC   s   &r   $test_get_name_addr_no_content_raises/TestParser.test_get_name_addr_no_content_raises  6    v6677  + 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z (foo) ,Nr  rC   s   &r   3test_get_name_addr_no_content_before_special_raises>TestParser.test_get_name_addr_no_content_before_special_raises  s6    v6677  , 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)r  Nr  rC   s   &r   5test_get_name_addr_no_angle_after_display_name_raises@TestParser.test_get_name_addr_no_angle_after_display_name_raises  r  rd   c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R 4       R# )r  r   mailboxr  r  Nr5   r   get_mailboxr   r   r#  r`  r  r  r$  r  r   r  s   & r   test_get_mailbox_addr_spec_only*TestParser.test_get_mailbox_addr_spec_only  s    ""6#5#5""" 	++Y7'../++Z87'--(**,BCr   c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )r  r   r  r  r  r  Nr  r  s   & r    test_get_mailbox_angle_addr_only+TestParser.test_get_mailbox_angle_addr_only  s    ""6#5#5$$$ 	++Y7'../++Z87'--(**,BCr   c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )$"Roy A. Bear" <dinsdale@example.com>r   r  Roy A. Bearr  r  r  Nr5   r   r  r   r   r`  r  r  r#  r$  r  r  s   & r   test_get_mailbox_name_addr%TestParser.test_get_mailbox_name_addr  s    ""6#5#5222 	++Y7--}=++Z87'--(**,BCr   c                   V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R4       R# )	z*"Roy A. Bear" <dinsdale@example.com>, restr  z, restr  r  r  r  r  Nr  r  s   & r    test_get_mailbox_ends_at_special+TestParser.test_get_mailbox_ends_at_special  s    ""6#5#5822 	++Y7--}=++Z87'--(**,BCr   c                "   V P                  \        P                  R R R\        P                  .^,          R4      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       R# r  )	r5   r   r  r   rv   r   r  r  r  r  s   & r   ,test_get_mailbox_quoted_strings_in_atom_list7TestParser.test_get_mailbox_quoted_strings_in_atom_list  s{    ""6#5#5--)''(* 	++->?7**,KLr   c                V   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       VP                  ^ ,          pV P                  VP                  4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  4       V P                  VP                  R 4       V P                  VP                  VP                  4       R# )r  r   mailbox-listr  r  N)r5   r   get_mailbox_listr   r   r  	mailboxesr#  r`  r  r  r$  r  all_mailboxes)r   mailbox_listr  s   &  r   !test_get_mailbox_list_single_addr,TestParser.test_get_mailbox_list_single_addr  s    ''(?(?""" 	00.A\334a8((+'../++Z87'--(**,BC//%33	5r   c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^,          P                  R4       V P                  VP                  VP                  4       R# )z/dinsdale@example.com, dinsdale@test.example.comr   r  r  dinsdale@test.example.comN)	r5   r   r  r   r   r  r  r  r  r   r  s   & r   %test_get_mailbox_list_two_simple_addr0TestParser.test_get_mailbox_list_two_simple_addr  s    ''(?(?=== 	00.A\334a8//2<<.	0//2<<3	5//%33	5r   c                L   V P                  \        P                  R R R . R4      pV P                  \	        VP
                  4      ^4       V P                  VP
                  ^ ,          P                  R4       V P                  VP
                  ^ ,          P                  R4       V P                  VP
                  ^,          P                  R4       V P                  VP
                  ^,          P                  R4       V P                  VP
                  VP                  4       R# )zS"Roy A. Bear" <dinsdale@example.com>, "Fred Flintstone" <dinsdale@test.example.com>r   r  r  r  Fred FlintstoneN)	r5   r   r  r   r  r  r  r`  r  r  s   & r   #test_get_mailbox_list_two_name_addr.TestParser.test_get_mailbox_list_two_name_addr  s    ''(?(?AAA 	\334a8//2<<.	0//2??%	'//2<<3	5//2??)	+//%33	5r   c                j   V P                  \        P                  R R R\        P                  .R4      pV P                  \        VP                  4      ^4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^,          P                  R4       V P                  VP                  ^,          P                  R4       V P                  VP                  VP                  4       R# )zd(foo) "Roy A. Bear" <dinsdale@example.com>(bar), "Fred Flintstone" <dinsdale@test.(bird)example.com>zV "Roy A. Bear" <dinsdale@example.com> , "Fred Flintstone" <dinsdale@test. example.com>r   r  r  r  r  N)r5   r   r  r   r  r   r  r  r  r`  r  r  s   & r   !test_get_mailbox_list_two_complex,TestParser.test_get_mailbox_list_two_complex  s   ''(?(?GGB(() 	\334a8//2<<.	0//2??%	'//2<<3	5//2??)	+//%33	5r   c           
     4   V P                  \        P                  R R R\        P                  \        P                  \        P
                  \        P
                  .R4      pV P                  \        VP                  4      ^4       V P                  \        VP                  4      ^4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  4       V P                  VP                  ^ ,          P                  R4       V P!                  VP                  ^,          VP                  ^ ,          4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       R# )	zY"Roy A. Bear"[] dinsdale@example.com, "Fred Flintstone" <dinsdale@test.(bird)example.com>zT"Roy A. Bear"[] dinsdale@example.com, "Fred Flintstone" <dinsdale@test. example.com>r   invalid-mailboxr  z"Roy A. Bear"r  r  N)r5   r   r  r   rv   r  r   r  r  r  r   r#  r`  r  r  r  assertIsr  s   & r   .test_get_mailbox_list_unparseable_mailbox_null9TestParser.test_get_mailbox_list_unparseable_mailbox_null*  s   ''(?(?GGB''''((((*  	\334a8\778!<33A6AA)	+,44Q7DDE33A6AA%	',44Q7>>?33A6@@'	)l003$..q1	3//2<<3	5//2??)	+r   c                *   V P                  \        P                  R R R \        P                  .R4      pV P                  \        VP                  4      ^4       V P                  \        VP                  4      ^4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^,          VP                  ^ ,          4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       R# )zU"Roy A. Bear" <dinsdale@example.com>@@, "Fred Flintstone" <dinsdale@test.example.com>r   r  r  r  r  r  N)r5   r   r  r   rv   r   r  r  r  r  r`  r   r  r  s   & r   .test_get_mailbox_list_junk_after_valid_address9TestParser.test_get_mailbox_list_junk_after_valid_addressH  sN   ''(?(?AAA''( 	\334a8\778!<33A6@@.	033A6CC%	'33A6AA)	+l003$..q1	3//2<<3	5//2??)	+r   c                x   V P                  \        P                  R R R\        P                  .^,          R4      pV P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^,          P                  R4       V P                  VP                  ^,          P                  R4       R# )z\"Roy A. Bear" <dinsdale@example.com>, (bird),, "Fred Flintstone" <dinsdale@test.example.com>zV"Roy A. Bear" <dinsdale@example.com>, ,, "Fred Flintstone" <dinsdale@test.example.com>r   r  r  r  r  N)r5   r   r  r   r  r   r  r  r  r  r`  r  s   & r   (test_get_mailbox_list_empty_list_element3TestParser.test_get_mailbox_list_empty_list_elementa  s   ''(?(?AAA(()!+ 	\334a833%//	133A6@@.	033A6CC%	'//2<<3	5//2??)	+r   c                   V P                  \        P                  R R R\        P                  .^,          R4      pV P                  \        VP                  4      ^ 4       V P                  VP                  VP                  4       R# )z(foo),, (bar)z ,, r   N)	r5   r   r  r   r  r   r  r  r  r  s   & r   )test_get_mailbox_list_only_empty_elements4TestParser.test_get_mailbox_list_only_empty_elementsw  ss    ''(?(?(()!+ 	\334a833%//	1r   c                   V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  \        VP                  4      ^ 4       V P                  VP                  VP                  4       R# )z	(hidden);z(hidden)rG   ;
group-listN)r5   r   get_group_listr   r   r  r  r  r   
group_lists   & r   test_get_group_list_cfws_only(TestParser.test_get_group_list_cfws_only  s{    %%f&;&;
 	..=Z112A6--#11	3r   c                v   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  VP                  ^,          P                  R4       R# )z;dinsdale@example.org, "Fred A. Bear" <dinsdale@example.org>r   r  Fred A. BearN)	r5   r   r  r   r   r  r  r  r`  r  s   & r    test_get_group_list_mailbox_list+TestParser.test_get_group_list_mailbox_list  s    %%f&;&;III
 	..=Z112A6--#11	3--a0=='	)r   c                :   V P                  \        P                  R R R\        P                  .R4      pV P                  VP                  R4       V P                  \        VP                  4      ^ 4       V P                  VP                  VP                  4       R# )z, (foo),,(bar)z, ,, r   r  N)
r5   r   r  r   r  r   r   r  r  r  r  s   & r   "test_get_group_list_obs_group_list-TestParser.test_get_group_list_obs_group_list  s    %%f&;&;(()
 	..=Z112A6--#11	3r   c                :   V P                  \        P                  R R R\        P                  .R4      pV P                  VP                  R4       V P                  \        VP                  4      ^ 4       V P                  VP                  VP                  4       R# )z(bar)rG   r   r  N)
r5   r   r  r   rv   r   r   r  r  r  r  s   & r   (test_get_group_list_comment_only_invalid3TestParser.test_get_group_list_comment_only_invalid  s    %%f&;&;''(
 	..=Z112A6--#11	3r   c                T   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  \        VP                  4      ^ 4       V P                  VP                  VP                  4       R# )Monty Python:;r   groupMonty PythonN	r5   r   	get_groupr   r   r`  r  r  r  r   r  s   & r   test_get_group_emptyTestParser.test_get_group_empty  s      !1!1 	))73++^<U__-q1,,	.r   c                   V P                  \        P                  R R R \        P                  .R4      pV P                  VP                  R4       V P                  \        VP                  4      ^ 4       V P                  \        VP                  4      ^4       V P                  VP                  ^ ,          P                  R4       R# )zfoo: <>;r   r@   r*  N)r5   r   r  r   rv   r   r`  r  r  r  r   r  s   & r   test_get_group_null_addr_spec(TestParser.test_get_group_null_addr_spec  s      !1!1''( 	++U3U__-q1U00115,,Q/55t<r   c                T   V P                  \        P                  R R R. R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  \        VP                  4      ^ 4       V P                  VP                  VP                  4       R# )zMonty Python: (hidden);Monty Python: ;r   r  r  Nr  r  s   & r   test_get_group_cfws_only#TestParser.test_get_group_cfws_only  s      !1!1%% 	))73++^<U__-q1,,	.r   c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  VP                  ^ ,          P                  R4       R# )z4Monty Python: "Fred A. Bear" <dinsdale@example.com>;r   r  r  r  N)
r5   r   r  r   r   r`  r  r  r  r  r  s   & r   test_get_group_single_mailbox(TestParser.test_get_group_single_mailbox  s      !1!1BBB 	))73++^<U__-q1,,	.+55/	1r   c                b   V P                  \        P                  R R R. R4      pV P                  VP                  R4       V P                  VP
                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  VP                  ^ ,          P
                  R4       V P                  VP                  ^,          P
                  R4       V P                  VP                  ^,          P                  R4       R# )	zhMonty Python: "Fred A. Bear" <dinsdale@example.com>,(foo) Roger <ping@exampele.com>, x@test.example.com;zcMonty Python: "Fred A. Bear" <dinsdale@example.com>, Roger <ping@exampele.com>, x@test.example.com;r   r  r  r  Rogerr   N)
r5   r   r  r   r   r`  r  r  r  r  r  s   & r   test_get_group_mixed_list$TestParser.test_get_group_mixed_list  s      !1!1GGB 	))73++^<U__-q1,,	.+88'	)+88 	"+66<r   c                   V P                  \        P                  R R R\        P                  \        P                  .R4      pV P                  VP                  R4       V P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  \        VP                  4      ^4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^,          P                  R4       V P                  VP                  ^,          P                  4       R# )zfMonty Python: "Fred A. Bear" <dinsdale@example.com>,(foo) Roger ping@exampele.com, x@test.example.com;zaMonty Python: "Fred A. Bear" <dinsdale@example.com>, Roger ping@exampele.com, x@test.example.com;r   r  r  r  r   N)r5   r   r  r   rv   r   r   r`  r  r  r  r  r#  r  s   & r   test_get_group_one_invalid%TestParser.test_get_group_one_invalid	  s     !1!1EE@'''')	 	))73++^<U__-q1U00115+88'	)+66<%--a0==>r   c                4   V P                  \        P                  R RR\        P                  .R4      pV P                  VP                  R4       V P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^,          P                  R4       V P                  VP                  ^,          P                  R4       V P                  VP                  ^,          P                  R	4       R
# )zSMonty Python:"Fred A. Bear" <dinsdale@example.com>,eric@where.test,John <jdoe@test>zTMonty Python:"Fred A. Bear" <dinsdale@example.com>,eric@where.test,John <jdoe@test>;r   r  r  r  r  zeric@where.testJohnz	jdoe@testN)r5   r   r  r   rv   r   r   r`  r  r  r  r  r  s   & r   $test_get_group_missing_final_semicol/TestParser.test_get_group_missing_final_semicol	  sF     !1!1011''( 	))73++^<U__-q1,,	.+55/	1+88'	)+55*	,+88	!+55$	&r   c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  VP                  ^ ,          P                  R4       V P                  V^ ,          P                  R4       R# )r  r   addressr  r  N	r5   r   get_addressr   r   r  r  r  r  r   r  s   & r   test_get_address_simple"TestParser.test_get_address_simple1	  s    ""6#5#5""" 	++Y7W../3** ..	0**1-44&	(.."	$r   c                   V P                  \        P                  R R R. R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  VP                  ^ ,          P                  R4       V P                  V^ ,          P                  R4       R# )z1(foo) "Fred A. Bear" <(bird)dinsdale@example.com>z' "Fred A. Bear" < dinsdale@example.com>r   r  r  r  N	r5   r   r  r   r   r  r  r  r`  r  s   & r   test_get_address_complex#TestParser.test_get_address_complexA	  s    ""6#5#5??5 	++Y7W../3** ..	0**1-::'	).."	$r   c                   V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  VP                  ^ ,          P                  R4       V P                  V^ ,          P                  R4       R# )z'=?utf-8?q?=C3=89ric?= <foo@example.com>u   Éric <foo@example.com>r   r  r   r  Nr  r  s   & r   %test_get_address_rfc2047_display_name0TestParser.test_get_address_rfc2047_display_nameQ	  s    ""6#5#55%% 	++Y7W../3** ..	0**1-:: 	".."	$r   c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        VP                  4      ^ 4       V P                  VP                  VP                  4       V P                  V^ ,          P                  R4       V P                  V^ ,          P                  R4       R# )r  r   r  r  r  Nr  r  s   & r   test_get_address_empty_group'TestParser.test_get_address_empty_groupa	  s    ""6#5#5 	++Y7W../3** ..	0.. 	"00'	)r   c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  V^ ,          P                  R4       V P                  V^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       R# )z+Monty Python: x@example.com, y@example.com;r   r  r  r  r   N)
r5   r   r  r   r   r  r  r  r`  r  r  s   & r   test_get_address_group!TestParser.test_get_address_groupq	  s    ""6#5#5999 	++Y7W../3** ..	0.. 	"00'	)**1-88#>r   c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  V^ ,          P                  R4       R# )z"foo bar"@example.comr   r  r  r  r  N)
r5   r   r  r   r   r  r  r  r  r  r  s   & r   "test_get_address_quoted_local_part-TestParser.test_get_address_quoted_local_part	  s    ""6#5#5### 	++Y7W../3** ..	0**1-44&	(**1-88"	$..	:r   c                   V P                  \        P                  R RR. R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  VP                  ^ ,          P                  R4       V P                  V^ ,          P                  R4       R# )zdinsdale@example.com, nextr  r  r  r  r  Nr  r  s   & r    test_get_address_ends_at_special+TestParser.test_get_address_ends_at_special	  s    ""6#5#5("" 	++Y7W../3** ..	0**1-44&	(..	:r   c           	     l   V P                  \        P                  R RR\        P                  \        P                  \        P                  .R4      pV P                  VP                  R4       V P                  \        VP                  4      ^ 4       V P                  \        VP                  4      ^4       V P                  VP                  ^ ,          P                  4       V P                  VP                  ^ ,          P                  R4       V P                  V^ ,          P                  R4       R# )zping example.com, nextzping example.comr  r  r  N)r5   r   r  r   rv   r   r   r  r  r  r#  r  r  r  s   & r   (test_get_address_invalid_mailbox_invalid3TestParser.test_get_address_invalid_mailbox_invalid	  s    ""6#5#5$''''''  	++Y7W../3W223Q7'//299:..q1<<>PQ..0ABr   c                   V P                  \        P                  R R R\        P                  .^,          R4      pV P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       R# r  )
r5   r   r  r   rv   r   r  r  r  r  r  s   & r   ,test_get_address_quoted_strings_in_atom_list7TestParser.test_get_address_quoted_strings_in_atom_list	  s    ""6#5#5--)''(* 	..q1<<>OP..q188-H..q1;;=\]r   c                N   V P                  \        P                  R RR\        P                  \        P                  .R4      pV P                  VP                  R4       V P                  \        VP                  4      ^ 4       V P                  \        VP                  4      ^4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  V^ ,          P                  R4       V P                  \        P                  RRR\        P                  \        P                  .R4      pV P                  VP                  R4       V P                  \        VP                  4      ^ 4       V P                  \        VP                  4      ^4       V P                  VP                  ^ ,          P                  R	4       V P                  VP                  ^ ,          P                  R
4       V P                  VP                  ^ ,          P                  R4       V P                  V^ ,          P                  R4       R# )<T@[<T@[]>r   r  z[]Tr  z!an??:=m==fr2@[Cz!an??:=m==fr2@[C];z[C]z=m==fr2r  N)r5   r   r  r   rv   r   r   r  r  r  r  r  r  s   & r   $test_get_address_with_invalid_domain/TestParser.test_get_address_with_invalid_domain	  s   ""6#5#5''''  	++Y7W../3W223Q7..q188$?..q1<<cB..q1<<>OP..0AB""6#5#5  ''''  	++Y7W../3W223Q7..q188%@..q1<<iH..q1<<>OP..8r   c                :   V P                  \        P                  R R R\        P                  .R4      pV P                  VP                  R4       V P                  \        VP                  4      ^ 4       V P                  VP                  VP                  4       R# )z(Recipient list suppressed)rG   r   address-listN)
r5   r   get_address_listr   r  r   r   r  r  r  r   address_lists   & r   test_get_address_list_CFWS%TestParser.test_get_address_list_CFWS	  s    ''(?(?(E(E(+)/)D)D(E(*, 	00.A\334a8//1K1KLr   c           	        V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       T P                  VP                   Uu. uF  p\        V4      NK  	  upVP                   Uu. uF  p\        V4      NK  	  up4       V P                  VP                  ^ ,          P                  R4       V P                  V^ ,          P                  R4       V P                  V^ ,          P                  4       R# u upi u upi )r  r   r:  r  r  N)r5   r   r;  r   r   r  r  r  r   	addressesr  r#  r`  r   r=  r   s   &  r   &test_get_address_list_mailboxes_simple1TestParser.test_get_address_list_mailboxes_simple	  s!   ''(?(?""" 	00.A\334a8//%33	5,*@*@A*@Q#a&*@A*6*@*@A*@Q#a&*@A	C//299=Ia33Y?,q/667	 BAs   %E	E
c           	        V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       T P                  VP                   Uu. uF  p\        V4      NK  	  upVP                   Uu. uF  p\        V4      NK  	  up4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^,          P                  R4       R# u upi u upi )z0foo@example.com, "Fred A. Bar" <bar@example.com>r   r:  r@   zFred A. BarN)r5   r   r;  r   r   r  r  r  r   rA  r  r`  rB  s   &  r   *test_get_address_list_mailboxes_two_simple5TestParser.test_get_address_list_mailboxes_two_simple	  s   ''(?(?>>> 	00.A\334a8//%33	5,*@*@A*@Q#a&*@A*6*@*@A*@Q#a&*@A	C//2==uE//2??O BAs   %E 	E
c           	        V P                  \        P                  R R R\        P                  \        P                  .R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       T P                  VP                   Uu. uF  p\        V4      NK  	  upVP                   Uu. uF  p\        V4      NK  	  up4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^,          P                  R4       V P                  VP                  ^,          P                  R4       R	# u upi u upi )
zn"Roy A. Bear" <dinsdale@example.com>, (ping) Foo <x@example.com>,Nobody Is. Special <y@(bird)example.(bad)com>z_"Roy A. Bear" <dinsdale@example.com>, Foo <x@example.com>,"Nobody Is. Special" <y@example. com>r   r:  r  r  r  r   Nobody Is. SpecialN)r5   r   r;  r   r  r   r   r  r  r  r   rA  r  r  r`  rB  s   &  r   'test_get_address_list_mailboxes_complex2TestParser.test_get_address_list_mailboxes_complex
  s   ''(?(?@@8 (('') 	00.A\334a8//%33	5,*@*@A*@Q#a&*@A*6*@*@A*@Q#a&*@A	C//299=I//2==yI//2==yI//2==sC//2??-	/ BAs   G%'G*
c                6   V P                  \        P                  R R R\        P                  \        P                  \        P                  \        P
                  \        P                  \        P
                  .R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  \        VP                  4      ^4       T P                  VP                   Uu. uF  p\        V4      NK  	  upVP                   Uu. uF  p\        V4      NK  	  up4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^,          P                  R4       V P                  \        VP                  ^ ,          P                  4      ^4       V P                  \        VP                  ^,          P                  4      ^ 4       V P                  \        VP                  ^,          P                  4      ^ 4       V P                  VP                  ^,          P                  ^ ,          P                  R4       V P                  VP                  ^,          P                  ^ ,          P                  R4       R	# u upi u upi )
zl"Roy A. Bear" <dinsdale@example.com>, (ping) Foo x@example.com[],Nobody Is. Special <(bird)example.(bad)com>z^"Roy A. Bear" <dinsdale@example.com>, Foo x@example.com[],"Nobody Is. Special" < example. com>r   r:  r  r  r  zFoo xrI  N)r5   r   r;  r   rv   r  r   r   r  r  r  r   rA  r  r  r`  rB  s   &  r   1test_get_address_list_mailboxes_invalid_addresses<TestParser.test_get_address_list_mailboxes_invalid_addresses(
  sb   ''(?(?>>7 (((((())(())+ !" 	00.A\334a8\778!<,*D*DE*DQ#a&*DE*6*@*@A*@Q#a&*@A	C//299=I//2==yI//2==yI//2==yI\33A6@@A1E\33A6@@A1E\33A6@@A1E""1%33A6AA7	L""1%33A6CC$	& FAs   >L"L
c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        VP                  4      ^ 4       V P                  VP                  VP                  4       V P                  \        VP                  4      ^4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  \        VP                  ^ ,          P                  4      ^ 4       R# )r  r   r:  r  r  N)
r5   r   r;  r   r   r  r  r  rA  r`  r<  s   & r   !test_get_address_list_group_empty,TestParser.test_get_address_list_group_emptyL
  s    ''(?(? 	00.A\334a8//%33	5\334a8//2==yI//2??P\33A6@@A1Er   c                L   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  ^ ,          P                  R4       R# )z#Monty Python: dinsdale@example.com;r   r:  r  r  N)r5   r   r;  r   r   r  r  r  r  rA  r`  r<  s   & r   "test_get_address_list_group_simple-TestParser.test_get_address_list_group_simple\
  s    ''(?(?111 	00.A\334a8//%33	5//299=I//2??'	)//2<<Q?FF&	(r   c                   V P                  \        P                  R R R . R4      pV P                  VP                  R4       V P                  \        VP                  4      ^4       V P                  VP                  VP                  4       V P                  \        VP                  4      ^4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  ^ ,          P                  R4       V P                  VP                  ^ ,          P                  ^,          P                  R4       V P                  VP                  ^,          P                  ^ ,          P                  R4       V P                  VP                  ^,          P                  ^ ,          P                  R4       V P                  \        VP                  ^,          4      \        VP                  ^,          4      4       R	# )
ziMonty Python: dinsdale@example.com, "Fred" <flint@example.com>;, Abe <x@example.com>, Bee <y@example.com>r   r:  r  r  r  flintr   yN)r5   r   r;  r   r   r  r  r  rA  r  r`  r  r   r<  s   & r   )test_get_address_list_group_and_mailboxes4TestParser.test_get_address_list_group_and_mailboxesm
  s   ''(?(?;;; 	00.A\334a8//%33	5\334a8//2==zJ//2??'	)//2<<Q?FF&	(//2<<Q?JJ 	"//2<<Q?JJ	//2<<Q?JJ	\33A67\33A67	9r   c                x    V P                  \        P                  R RR \        P                  .^,          4      pR# )z;attachmentz; attachmentN)r:   r    parse_content_disposition_headerr   rv   )r   content_disps   & r    test_invalid_content_disposition+TestParser.test_invalid_content_disposition
  s3    ))33>=''(*
r   c                x    V P                  \        P                  R R R \        P                  .^,          4      pR# )z;fooN)r:   r   &parse_content_transfer_encoding_headerr   rv   )r   ctes   & r   &test_invalid_content_transfer_encoding1TestParser.test_invalid_content_transfer_encoding
  s2      99FFV%?%?$@$B
r   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; ir   r_   r   r`   r   
get_msg_idrC   s   &r   test_get_msg_id_empty TestParser.test_get_msg_id_empty
  s6    v6677b! 8777rd   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       R# )z%<simeple.local@example.something.com>r   msg-idNr5   r   rf  r   r   r   msg_ids   & r   test_get_msg_id_valid TestParser.test_get_msg_id_valid
  sB    !!333 	**H5r   c                    V P                  \        P                  R R R\        P                  .R4      pV P                  VP                  R4       R# )z<"simeple.local"@example.com>z<simeple.local@example.com>r   rj  Nr5   r   rf  r   r  r   r   rl  s   & r   test_get_msg_id_obsolete_local)TestParser.test_get_msg_id_obsolete_local
  sK    !!++)(() 	**H5r   c                    V P                  \        P                  R R R . R4      pV P                  VP                  R4       R# )z&<simple.local@[someexamplecom.domain]>r   rj  Nrk  rl  s   & r   *test_get_msg_id_non_folding_literal_domain5TestParser.test_get_msg_id_non_folding_literal_domain
  sB    !!444 	**H5r   c                l    V P                  \        P                  R R R\        P                  .R4      pR# )z<simplelocal@(old)example.com>z<simplelocal@ example.com>r   N)r5   r   rf  r   r  rl  s   & r   $test_get_msg_id_obsolete_domain_part/TestParser.test_get_msg_id_obsolete_domain_part
  s3    !!,,((()
r   c                    V P                  \        P                  R R R \        P                  .R4      pV P                  VP                  R4       R# )z<simplelocal>r   rj  Nr5   r   rf  r   rv   r   r   rl  s   & r    test_get_msg_id_no_id_right_part+TestParser.test_get_msg_id_no_id_right_part
  sK    !!''(
 	**H5r   c                    R p\         P                  ! V4      pV P                  VP                  \        P
                  .4       R# )3935-XPB-567:0:45327:9:90305:17843586-40@example.comN)r   parse_message_idr'   r(   r   rv   )r   textrm  s   &  r   1test_get_msg_id_invalid_expected_msg_id_not_found<TestParser.test_get_msg_id_invalid_expected_msg_id_not_found
  s:    D((.''(	*r   c                    V P                  \        P                  R R R \        P                  .4      pV P                  VP                  R4       R# )r  zinvalid-message-idN)r:   r   r  r   rv   r   r   r   
message_ids   & r   test_parse_invalid_message_id(TestParser.test_parse_invalid_message_id
  sI    ''##AAA''(
 	..0DEr   c                    V P                  \        P                  R R R . 4      pV P                  VP                  R4       R# )z<aperson@somedomain>
message-idN)r:   r   r  r   r   r  s   & r   test_parse_valid_message_id&TestParser.test_parse_valid_message_id
  s?    ''##"""
 	..=r   c           	     6   V P                  \        P                  R RR\        P                  .\        P
                  .^,          ,           . 4      pV P                  VP                  R4       V P                  \        VP                  R,          4      R4       R# )r4  r5  r  z"end of input inside domain-literalNr  )
r:   r   r  r   r  rv   r   r   r   r(   r  s   & r   )test_parse_message_id_with_invalid_domain4TestParser.test_parse_message_id_with_invalid_domain
  s    ''##(()V-G-G,H1,LL
 	..=Z33B78=	?r   c                    V P                  \        P                  R RR\        P                  .. 4      pV P                  VP                  R4       V P                  \        VP                  ^ ,          4      R4       R# )z%<validmessageid@example>thensomethingz<validmessageid@example>r  zUnexpected 'thensomething'N)	r:   r   r  r   rv   r   r   r   r(   r  s   & r   $test_parse_message_id_with_remaining/TestParser.test_parse_message_id_with_remaining
  sn    ''##3&&''(
 	..=Z33A675	7r   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)msgwithnoankleNre  rC   s   &r   test_get_msg_id_no_angle_start)TestParser.test_get_msg_id_no_angle_start
  7    v6677./ 8777rd   c                    V P                  \        P                  R RR\        P                  .R4      pV P                  VP                  R4       R# )z<simplelocal@domainz<simplelocal@domain>r   rj  Nr{  rl  s   & r   test_get_msg_id_no_angle_end'TestParser.test_get_msg_id_no_angle_end  sK    !!!""''(
 	**H5r   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z	<@domain>Nre  rC   s   &r   test_get_msg_id_empty_id_left(TestParser.test_get_msg_id_empty_id_left  r  rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z<simplelocal@>Nre  rC   s   &r   test_get_msg_id_empty_id_right)TestParser.test_get_msg_id_empty_id_right  r  rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z<simplelocal@Nre  rC   s   &r   test_get_msg_id_no_id_right&TestParser.test_get_msg_id_no_id_right!  s6    v6677o. 8777rd   c                    V P                  \        P                  4      ;_uu_ 4        \        P                  ! R 4       RRR4       R#   + '       g   i     R# ; i)z<[abrakadabra@microsoft.com]>Nre  rC   s   &r   test_get_msg_id_with_brackets(TestParser.test_get_msg_id_with_brackets%  s9     v6677=> 8777rd   c                    V P                  \        P                  R R R \        P                  .R4      pV P                  VP                  R4       R# )z
< @domain>r   rj  Nrq  rl  s   & r   test_get_msg_id_ws_only_local(TestParser.test_get_msg_id_ws_only_local+  sK    !!(()
 	**H5r   r   N(`  r   r   r   r   bytesr  r   r!  r,   ascii_lettersdigitsr  	translater   	maketransrf  rD   rI   rM   rQ   rV   rZ   rb   rf   ri   rl   rr   rw   r{   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r	  r  r  r  r  r%  r+  r1  r4  r8  r;  r?  rB  rE  rK  rN  rR  rU  rZ  r^  rb  rf  rj  rm  rp  rs  rv  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  r  r  r  r  r  r  r  r  r  r
  r  r  r  r  r  r"  r%  r(  r1  r6  r:  r?  rF  rJ  rM  rQ  rT  rY  r\  r`  rf  rj  rm  rq  ru  rx  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r"  r%  r(  r,  r/  r3  r7  r;  r>  rB  rF  rJ  rM  rP  rV  rY  r]  rc  rg  rk  rn  rr  ru  rx  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r'  r+  r.  r1  r5  r8  r;  r?  rB  rE  rI  rM  rP  rS  rW  rZ  rb  re  rh  rl  ro  rr  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  r  r  r  r  r  r  r  r  r  r  r
  r  r  r  r  r  r"  r%  r(  r+  r.  r1  r7  r>  rC  rF  rJ  rM  rP  rS  rX  r]  rb  rg  rn  rr  ru  rx  r|  r  r  r  r  r  r  r  r  r  r  r  r  r   r    r!   s   @r   r=   r=   -   s;      b#/66w?++fmm;./O)33CMM"R4OPOBDJ0FN
+-/=##1/*&=F---------4
Q9A59;59;E//-4
C;C7;=E/-4
?
=E=E?
51J:FF4=.
/$
8
*HH"
:Q=
=4
6
+1A
32
1
21
1
627,,5546:540252
545522&'46:0)11213+R*
2
+/-8:5;/+6B8?H)<BB	D<BC	DBML&-8;;;;CCG	<4
?
=EE%7;=7;=..,	9990167777777"+3
F	F	F	I	I	O	I@PP8?1>&4G5AG
M
G
G
G
G
G&',2)2FS	L	J	=	F1FFFFFAAFF%,-,DDDD	M5$5 5,5,+<+2+,	1
3)
3
3.
=.1=*?(&6$ $ $ ) ?";";C"	^9F	M8"P /6"&HF ("9:

"
	6	6	6
	6*F>?70	6+0/?	6 	6r   r=   c                     a  ] tR tRt o R tRRRRR'.. 3RRR	R
R'R(.. 3RRRRR).. 3RRRRR*.]P                  .3RRRRR).]P                  .3RRRRR*.]P                  .3RRRRR+.]P                  .3RRRRR).]P                  .3RRRRR+.]P                  .^,          3RRRR R,.]P                  .^,          3R!R"R#R$R-.]P                  .^,          3/tR%tV t	R&# ).Test_parse_mime_parametersi8  c                    V P                  \        P                  WW54      pV P                  VP                  R 4       V P                  \        VP                  4      V4       R# )zmime-parametersN)r:   r   parse_mime_parametersr   r   listparams)r   r   tl_strtl_valuer  r-   mime_parameterss   &&&&&& r   mime_parameters_as_value3Test_parse_mime_parameters.mime_parameters_as_value;  sS     ,,V-I-I8.335FGo445v>r   simplezfilename="abc.py"z filename="abc.py"zfilename=abc.pymultiple_keyszfilename="abc.py"; xyz=abcz filename="abc.py"; xyz="abc"zfilename=abc.py; xyz=abcsplit_valuez;filename*0*=iso-8859-1''%32%30%31%2E; filename*1*=%74%69%66z filename="201.tif"duplicate_keyz#filename=abc.gif; filename=def.tiffz filename="abc.gif"duplicate_key_with_split_valuezMfilename*0*=iso-8859-1''%32%30%31%2E; filename*1*=%74%69%66; filename=abc.gif*duplicate_key_with_split_value_other_orderzNfilename=abc.gif;  filename*0*=iso-8859-1''%32%30%31%2E; filename*1*=%74%69%66zMfilename=abc.gif; filename*0*=iso-8859-1''%32%30%31%2E; filename*1*=%74%69%66duplicate_in_split_valuezPfilename*0*=iso-8859-1''%32%30%31%2E; filename*1*=%74%69%66; filename*1*=abc.gifz filename="201.tifabc.gif"missing_split_valuez<filename*0*=iso-8859-1''%32%30%31%2E; filename*3*=%74%69%66;!duplicate_and_missing_split_valuezPfilename*0*=iso-8859-1''%32%30%31%2E; filename*3*=%74%69%66; filename*3*=abc.gif!duplicate_with_broken_split_valuezNfilename=abc.gif;  filename*2*=iso-8859-1''%32%30%31%2E; filename*3*=%74%69%66z filename="abc.gif201.tif"zMfilename=abc.gif; filename*2*=iso-8859-1''%32%30%31%2E; filename*3*=%74%69%66extra_dquotez	r*="'a'\"z r="\""zr*='a'"r   N)filenamezabc.py)xyzr]   )r  z201.tif)r  zabc.gif)r  z201.tifabc.gif)r  zabc.gif201.tif)rr]  )
r   r   r   r   r  r   rv   mime_parameters_paramsr   r    r!   s   @r   r  r  8  s    	? 	 #$ 	(+&#^4 	I!I$% 	1!1$%''(* 	)$!$$%''(+* 	5O!O$%''(7* 	#'('+,''(%* 	J!J$%''( * 	,'('+,''(*., 	,O(O+,''(*., 	L''(*,ybr   r  c                      a  ] tR tRt o R tRRRR^^ . 3RRRR^^ . 3RR	R	R
^^ . 3RRRR^^ . 3RRRRRR]P                  .3/tRtV t	R# )Test_parse_mime_versioni  c                    V P                  \        P                  WW64      pV P                  VP                  V4       V P                  VP
                  V4       R # r&   )r:   r   parse_mime_versionr   majorminor)r   r   r  r  r  r  r-   mime_versions   &&&&&&& r   mime_version_as_value-Test_parse_mime_version.mime_version_as_value  sM     ))&*C*C8.++U3++U3r   
rfc_2045_1z1.0
RFC_2045_2z1.0 (produced by MetaSend Vx.x)z1.0 
RFC_2045_3z(produced by MetaSend Vx.x) 1.0z 1.0
RFC_2045_4z1.(produced by MetaSend Vx.x)0z1. 0emptyr   Nr   )
r   r   r   r   r  r   HeaderMissingRequiredValuemime_version_paramsr   r    r!   s   @r   r  r    s     
4 	 	-- 	-- 	,, 	../1E*
r   r  c                      a  ] tR tRt o ]P
                  t]3R ltR tR tR t	R t
R tR tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )TestFoldingi  c                f    V P                  VP                  VR 7      W!P                  4       4       R# )r   N)r   foldppstr)r   r*   foldedr   s   &&&&r   _testTestFolding._test  s#    /Dr   c                R    V P                  \        P                  ! R 4      R4       R# )zThis is a testzThis is a test
Nr  r   r   rC   s   &r   !test_simple_unstructured_no_folds-TestFolding.test_simple_unstructured_no_folds  s    

6**+;<%	'r   c                R    V P                  \        P                  ! R 4      R4       R# )zvThis is also a test, but this time there are enough words (and even some symbols) to make it wrap; at least in theory.zxThis is also a test, but this time there are enough words (and even some
 symbols) to make it wrap; at least in theory.
Nr  rC   s   &r   test_simple_unstructured_folded+TestFolding.test_simple_unstructured_folded  s)    

6** ,H IF	Gr   c                R    V P                  \        P                  ! R 4      R4       R# )u   hübsch kleiner beißtz+=?utf-8?q?h=C3=BCbsch_kleiner_bei=C3=9Ft?=
Nr  rC   s   &r   'test_unstructured_with_unicode_no_folds3TestFolding.test_unstructured_with_unicode_no_folds  s     

6**+CDA	Cr   c                R    V P                  \        P                  ! R 4      R4       R# )uQ   Mein kleiner Kaktus ist sehr hübsch.  Es hat viele Stacheln und oft beißt mich.zuMein kleiner Kaktus ist sehr =?utf-8?q?h=C3=BCbsch=2E?=  Es hat viele Stacheln
 und oft =?utf-8?q?bei=C3=9Ft?= mich.
Nr  rC   s   &r   (test_one_ew_on_each_of_two_wrapped_lines4TestFolding.test_one_ew_on_each_of_two_wrapped_lines  s'    

6** ,B C=	>r   c                R    V P                  \        P                  ! R 4      R4       R# )uD   Mein Kaktus ist hübsch.  Es beißt mich.  And that's all I'm sayin.z\Mein Kaktus ist =?utf-8?q?h=C3=BCbsch=2E__Es_bei=C3=9Ft?= mich.  And that's
 all I'm sayin.
Nr  rC   s   &r   test_ews_combined_before_wrap)TestFolding.test_ews_combined_before_wrap  s'    

6** ,G H'	(r   c                    V P                  \        P                  ! R 4      R4       RpV P                  \        P                  ! VR ,           4      VR,           4       R# )u   =?unknown-8bit?q?=A4?=¤z)=?unknown-8bit?q?=A4?==?utf-8?q?=C2=A4?=
z+=?unknown-8bit?q?=A4?=
 =?utf-8?q?=C2=A4?=
N70123456789 0123456789 0123456789 0123456789 0123456789 r  r   prefixs   & r   'test_unicode_after_unknown_not_combined3TestFolding.test_unicode_after_unknown_not_combined  sN    

6**+GH?	A 

6**64P+PQKK	Mr   c                    V P                  \        P                  ! R 4      R4       RpV P                  \        P                  ! VR ,           4      VR,           4       R# )z=?unknown-8bit?q?=A4?=abcz=?unknown-8bit?q?=A4?=abc
z(=?unknown-8bit?q?=A4?=
 =?utf-8?q?abc?=
Nr  r  r  s   & r   %test_ascii_after_unknown_not_combined1TestFolding.test_ascii_after_unknown_not_combined  sM    

6**+FG0	2 

6**64O+OPHH	Jr   c                    V P                  \        P                  ! R 4      R4       RpV P                  \        P                  ! VR ,           4      VR,           4       R# )u   ¤=?unknown-8bit?q?=A4?=z)=?utf-8?q?=C2=A4?==?unknown-8bit?q?=A4?=
z+=?utf-8?q?=C2=A4?=
 =?unknown-8bit?q?=A4?=
Nr  r  r  s   & r   'test_unknown_after_unicode_not_combined3TestFolding.test_unknown_after_unicode_not_combined  sV    

6** ,D E?	A !

6**64P+PQKK	Mr   c                    V P                  \        P                  ! R 4      R4       RpV P                  \        P                  ! VR,           4      VR,           4       R# )zabc=?unknown-8bit?q?=A4?=zabc=?unknown-8bit?q?=A4?=
zabcd=?unknown-8bit?q?=A4?=zabcd
 =?unknown-8bit?q?=A4?=
Nr  r  r  s   & r   %test_unknown_after_ascii_not_combined1TestFolding.test_unknown_after_ascii_not_combined%  sT    

6** ,D E0	2 !

6**64P+PQ==	?r   c                    V P                  \        P                  ! R 4      R4       RpV P                  \        P                  ! VR ,           4      VR,           4       R# )z,=?unknown-8bit?q?=C2?==?unknown-8bit?q?=A4?=z=?unknown-8bit?q?=C2=A4?=
z/=?unknown-8bit?q?=C2?=
 =?unknown-8bit?q?=A4?=
Nr  r  r  s   & r   test_unknown_after_unknown&TestFolding.test_unknown_after_unknown-  s^    

6** ,D E0	2 !

6**6 5D ,D EOO	Qr   c                `    V P                  \        P                  ! R 4      ^ ,          R4       R# )zabc <xyz@example.com>zabc <xyz@example.com>
Nr  r   r;  rC   s   &r   test_simple_addressTestFolding.test_simple_address8  s$    

6**+BCAF,	.r   c                `    V P                  \        P                  ! R 4      ^ ,          R4       R# )zabc <xyz@example.com>, "Fred Blunt" <sharp@example.com>, "J.P.Cool" <hot@example.com>, "K<>y" <key@example.com>, Firesale <cheap@example.com>, <end@example.com>zabc <xyz@example.com>, "Fred Blunt" <sharp@example.com>,
 "J.P.Cool" <hot@example.com>, "K<>y" <key@example.com>,
 Firesale <cheap@example.com>, <end@example.com>
Nr  rC   s   &r   #test_address_list_folding_at_commas/TestFolding.test_address_list_folding_at_commas<  s6    

6** ,@ A
 BCDI	Jr   c                `    V P                  \        P                  ! R 4      ^ ,          R4       R# )uI   Hübsch Kaktus <beautiful@example.com>, beißt beißt <biter@example.com>o=?utf-8?q?H=C3=BCbsch?= Kaktus <beautiful@example.com>,
 =?utf-8?q?bei=C3=9Ft_bei=C3=9Ft?= <biter@example.com>
Nr  rC   s   &r   $test_address_list_with_unicode_names0TestFolding.test_address_list_with_unicode_namesG  s/    

6**45568K	Lr   c                `    V P                  \        P                  ! R 4      ^ ,          R4       R# )uM   "Hübsch Kaktus" <beautiful@example.com>, "beißt" beißt <biter@example.com>r  Nr  rC   s   &r   .test_address_list_with_unicode_names_in_quotes:TestFolding.test_address_list_with_unicode_names_in_quotesN  s/    

6**6778:K	Lr   c           	     &   V P                   P                  ^(R7      p. ROpV FV  w  r4V P                  VR7      ;_uu_ 4        V P                  \        P
                  ! V4      ^ ,          WAR7       RRR4       KX  	  R#   + '       g   i     Km  ; i)(   max_line_lengthtor   N))z@=?utf-8?q?A_v=C3=A9ry_long_name_with=2C_comma?= <to@example.com>OA =?utf-8?q?v=C3=A9ry_long_name_with?=
 =?utf-8?q?=2C?= comma <to@example.com>
)zH=?utf-8?q?This_long_name_does_not_need_encoded=2Dword?= <to@example.com>z<This long name does not need
 encoded-word <to@example.com>
)u0   "A véry long name with, comma" <to@example.com>r  )u8   "A véry long name containing a, comma" <to@example.com>zWA =?utf-8?q?v=C3=A9ry?= long name
 containing =?utf-8?q?a=2C?= comma
 <to@example.com>
r   clonesubTestr  r   r;  r   r   casesr  r  s   &    r   /test_address_list_with_specials_in_encoded_word;TestFolding.test_address_list_with_specials_in_encoded_wordU  ss     ""2"6
" "LR$$

62226q96
Q %$ "$$$   /A??Bc                    RpV R2pV P                  \        P                  ! V4      ^ ,          V R24       RpRV R2pV P                  \        P                  ! V4      ^ ,          RV R24       R# )	r   u*   , "Hübsch Kaktus" <beautiful@example.com>z:,
 =?utf-8?q?H=C3=BCbsch?= Kaktus <beautiful@example.com>
r]  u=   " <xyz@example.com>, "Hübsch Kaktus" <beautiful@example.com>zM"
 <xyz@example.com>, =?utf-8?q?H=C3=BCbsch?= Kaktus <beautiful@example.com>
NzNxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@example.comzO...............................................................................r  )r   r  r  s   &  r   0test_address_list_with_list_separator_after_fold<TestFolding.test_address_list_with_list_separator_after_foldn  s    %s<=

6**2.q1cMN	P PQ

6**2.q1s ( (	)r   c           	     &   V P                   P                  ^(R7      p. ROpV FV  w  r4V P                  VR7      ;_uu_ 4        V P                  \        P
                  ! V4      ^ ,          WAR7       RRR4       KX  	  R#   + '       g   i     Km  ; i)r  r  r  r   N))zC"Exfiltrator <spy@example.org> (unclosed comment?" <to@example.com>zE"Exfiltrator <spy@example.org> (unclosed
 comment?" <to@example.com>
)zD"Escaped \" chars \\ in quoted-string stay escaped" <to@example.com>zF"Escaped \" chars \\ in quoted-string
 stay escaped" <to@example.com>
)z<This long display name does not need quotes <to@example.com>z>This long display name does not need
 quotes <to@example.com>
)z@"Quotes are not required but are retained here" <to@example.com>zB"Quotes are not required but are
 retained here" <to@example.com>
)z;"A quoted-string, it can be a valid local-part"@example.comz="A quoted-string, it can be a valid
 local-part"@example.com
)z="local-part-with-specials@but-no-fws.cannot-fold"@example.comz>"local-part-with-specials@but-no-fws.cannot-fold"@example.com
r  r  s   &    r   5test_address_list_with_specials_in_long_quoted_stringATestFolding.test_address_list_with_specials_in_long_quoted_string{  sq    ""2"6
( "LR$$

62226q96
Q %$ "$$$r  c           	     0   \         P                  ! R4      p\         P                  ! \         P                  ! \         P                  ! RR4      .4      \         P
                  ! \         P                  ! RR4      .4      V.4      pV P                  VR4       R# )z   ztest:r|  rG   r   NzP   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxzXtest:   
 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
)r   r   HeaderHeaderLabelValueTerminalCFWSListWhiteSpaceTerminalr  )r   bodyheaders   &  r   7test_split_at_whitespace_after_header_before_long_tokenCTestFolding.test_split_at_whitespace_after_header_before_long_token  st    &&~6 4 4Wg FGHOOV66sEBCDd L M 	

689r   c                R    V P                  \        P                  ! R4      R4       R# )xxx   NzSxxx   yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzUxxx  
 yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
r  rC   s   &r   *test_split_at_whitespace_before_long_token6TestFolding.test_split_at_whitespace_before_long_token  s    

6**+<=-	/r   c                V   R pRp\        V4      ^,           pV\        V4      ,           pV P                  \        P                  ! VR,           4      W,           R^NV,
          ,          ,           R,           R,           V,           R^P^NV,
          ,
          ,          ,           R,           4       R# )r1  z
=?utf-8?q?rW  z?=
rG   NPyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy)r  r  r   r   )r   first_token_with_whitespacechrome_leader
len_chrome	len_non_ys   &    r   #test_overlong_encodeable_is_wrapped/TestFolding.test_overlong_encodeable_is_wrapped  s    &.#$'!+
%@!AA	

6**+F+1,2 3.>ByL)*,23*+-0"bl2C-DEGMN	Or   c                R    V P                  \        P                  ! R 4      R4       R# )zZattachment; filename="TEST_TEST_TEST_TEST_TEST_TEST_TEST_TEST_TEST_TEST_TEST_TEST_TES.txt"zvattachment;
 filename*0*=us-ascii''TEST_TEST_TEST_TEST_TEST_TEST_TEST_TEST_TEST_TEST_TEST;
 filename*1*=_TEST_TES.txt
N)r  r   r[  rC   s   &r   test_long_filename_attachment)TestFolding.test_long_filename_attachment  s'    

6::DE+	r   r   N)r   r   r   r   r   defaultr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r!  r$  r.  r2  r:  r=  r   r    r!   s   @r   r  r    s     ^^F'- E'GC>(MJM?Q.	JLLR2)R>:/	O r   r  __main__)r,   unittestemailr   r   r   r   test.test_emailr   r   r
   r$   r=   r  r  r  r   mainr   r   r   <module>rE     s      0   7	. 	. 2G,6- G,6VX p- p pd 8
o} 8
 8
xP- Pd zMMO r   