1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Ë
oñúhÜ ã ó—dZddlZddlZddlmZmZddlmZeje
e e e eeeg¬«d„«Zeje
e fe e fe e
feefee feefe efe efgd„¬«d„«Zd    „Zej$j'd
«d „«Zej$j+d gd ¢«d„«Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z ej$j+dddg«Gd„d««Z!d„Z"d„Z#y)zG"
Test module for testing ``pandas._testing.assert_produces_warning``.
éN)Ú DtypeWarningÚPerformanceWarning)Úparamscó—|jS)zx
    Return unique warning.
 
    Useful for testing behavior of tm.assert_produces_warning with various categories.
    ©Úparam©Úrequests úaH:\Change_password\venv_build\Lib\site-packages\pandas/tests/util/test_assert_produces_warning.pyÚcategoryr s€ð" =‰=Ðócó,—t|«jS©N)ÚtypeÚ__name__)Úxs r ú<lambda>r/s€”$q“'×"Ñ"€r )rÚidscó—|jS)z’
    Return pair or different warnings.
 
    Useful for testing how several different warnings are handled
    in tm.assert_produces_warning.
    rr    s r Úpair_different_warningsr$s€ð( =‰=Ðr cól—tjdt«tjdt«y)NÚf1Úf2)ÚwarningsÚwarnÚ FutureWarningÚRuntimeWarning©r r Úfr;s€Ü ‡MM$œ Ô&Ü ‡MM$œÕ'r zignore:f1:FutureWarningcóL—d}tjt|¬«5tjt
«5t «ddd«ddd«tjt
d¬«5t «ddd«y#1swYŒ@xYw#1swYŒDxYw#1swYyxYw)NúCaused unexpected warning\(s\)©ÚmatchF©Úraise_on_extra_warnings)ÚpytestÚraisesÚAssertionErrorÚtmÚassert_produces_warningrr©Úmsgs r Ú*test_assert_produces_warning_honors_filterr-@s…€ð ,€CÜ    ‰”~¨SÔ    1ñÜ × 'Ñ '¬Ó 7ñ    Ü ŒC÷    ÷ô
×    #Ñ    #¤NÈEÔ    Rñ Ü    Œ÷ ð ÷    ð    ú÷ðú÷ ð ús.žB¸ BÁBÁ. BÂB     ÂBÂBÂB#zmessage, match) )ÚN)r.r.)úWarning messagez.*)r/ÚWar)r/z
[Ww]arning)r/Úage)r/zage$)úMessage 12-234 with numbersz \d{2}-\d{3})r2z^Mes.*\d{2}-\d{3})r2z\d{2}-\d{3}\s\S+)zMessage, which we do not matchNcóˆ—tj||¬«5tj||«ddd«y#1swYyxYw)Nr"©r)r*rr)r Úmessager#s   r Ú%test_catch_warning_category_and_matchr6Ls7€ô"
×    #Ñ    # H°EÔ    :ñ)܏ ‰ g˜xÔ(÷)÷)ñ)ús    ˜8¸Acó(—t}d}d}tjt|¬«5t    j
||¬«5t jd|«t jd|«ddd«ddd«y#1swYŒxYw#1swYyxYw)NzDid not see this warningzÇDid not see warning 'RuntimeWarning' matching 'Did not see this warning'. The emitted warning messages are \[RuntimeWarning\('This is not a match.'\), RuntimeWarning\('Another unmatched warning.'\)\]r"úThis is not a match.úAnother unmatched warning.)rr&r'r(r)r*rr©r r#Ú    unmatcheds   r Ú"test_fail_to_match_runtime_warningr<asŒ€Ü€HØ &€Eð    <ðô
‰”~¨YÔ    7ñBÜ × 'Ñ '¨¸Ô >ñ    BÜ M‰MÐ0°(Ô ;Ü M‰MÐ6¸Ô A÷    B÷BðB÷    Bð    Bú÷BðBúó"¦B¾-A<Á+BÁ<B    ÂBÂBcó(—t}d}d}tjt|¬«5t    j
||¬«5t jd|«t jd|«ddd«ddd«y#1swYŒxYw#1swYyxYw)NÚWarningz³Did not see warning 'FutureWarning' matching 'Warning'. The emitted warning messages are \[FutureWarning\('This is not a match.'\), FutureWarning\('Another unmatched warning.'\)\]r"r8r9)rr&r'r(r)r*rrr:s   r Ú!test_fail_to_match_future_warningr@psŒ€Ü€HØ €Eð    ;ðô
‰”~¨YÔ    7ñBÜ × 'Ñ '¨¸Ô >ñ    BÜ M‰MÐ0°(Ô ;Ü M‰MÐ6¸Ô A÷    B÷BðB÷    Bð    Bú÷BðBúr=có(—t}d}d}tjt|¬«5t    j
||¬«5t jd|«t jd|«ddd«ddd«y#1swYŒxYw#1swYyxYw)Nz\d+z·Did not see warning 'ResourceWarning' matching '\\d\+'. The emitted warning messages are \[ResourceWarning\('This is not a match.'\), ResourceWarning\('Another unmatched warning.'\)\]r"r8r9)ÚResourceWarningr&r'r(r)r*rrr:s   r Ú#test_fail_to_match_resource_warningrCsŒ€Ü€HØ €Eð    =ðô
‰”~¨YÔ    7ñBÜ × 'Ñ '¨¸Ô >ñ    BÜ M‰MÐ0°(Ô ;Ü M‰MÐ6¸Ô A÷    B÷BðB÷    Bð    Bú÷BðBúr=cóò—|\}}d}tjt|¬«5tj|«5t j d|«ddd«ddd«y#1swYŒxYw#1swYyxYw)Nz%Did not see expected warning of classr"zwarning message©r&r'r(r)r*rr)rÚexpected_categoryÚactual_categoryr#s    r Ú!test_fail_to_catch_actual_warningrHŽsm€Ø)@Ñ&ÐØ 3€EÜ    ‰”~¨UÔ    3ñ>Ü × 'Ñ 'Ð(9Ó :ñ    >Ü M‰MÐ+¨_Ô =÷    >÷>ð>÷    >ð    >ú÷>ð>ús"£A-¹A!ÁA-Á!A*    Á&A-Á-A6có¾—|\}}tj|d¬«5tjd|«tjd|«ddd«y#1swYyxYw)NFr$úExpected warningzUnexpected warning OKr4)rrFÚextra_categorys   r Útest_ignore_extra_warningrL–sR€Ø(?Ñ%А~Ü     ×    #Ñ    #Ð$5ÈuÔ    Uñ?܏ ‰ Ð(Ð*;Ô<܏ ‰ Ð-¨~Ô>÷?÷?ñ?ús -AÁAcó—|\}}d}tjt|¬«5tj|«5t j d|«t j d|«ddd«ddd«y#1swYŒxYw#1swYyxYw)Nr!r"rJzUnexpected warning NOT OKrE)rrFrKr#s    r Útest_raise_on_extra_warningrNs†€Ø(?Ñ%А~Ø -€EÜ    ‰”~¨UÔ    3ñGÜ × 'Ñ 'Ð(9Ó :ñ    GÜ M‰MÐ,Ð.?Ô @Ü M‰MÐ5°~Ô F÷    G÷GðG÷    Gð    Gú÷GðGús"£B¹-A7Á&BÁ7B    Á<BÂB cóì—t}tj|d¬«5tjd|«tjd|«tjd|«ddd«y#1swYyxYw)Nú ^Match thisr"ú
Match thisúDo not match thatúDo not match that either)Ú UserWarningr)r*rr©r s r Ú1test_same_category_different_messages_first_matchrV¦sX€Ü€HÜ     ×    #Ñ    # H°NÔ    Cñ<܏ ‰ l HÔ-܏ ‰ Ð)¨8Ô4܏ ‰ Ð0°(Ô;÷<÷<ñ<úó žAA*Á*A3cóì—t}tj|d¬«5tjd|«tjd|«tjd|«ddd«y#1swYyxYw)NrPr"rRrSrQ)ÚDeprecationWarningr)r*rrrUs r Ú0test_same_category_different_messages_last_matchrZ®sX€Ü!€HÜ     ×    #Ñ    # H°NÔ    Cñ.܏ ‰ Ð)¨8Ô4܏ ‰ Ð0°(Ô;܏ ‰ l HÔ-÷.÷.ñ.úrWcóܗttf}tj|d¬«5t    j
dt«t    j
dt«ddd«y#1swYyxYw)NrPr"rQzMatch this too)rrTr)r*rrrUs r Útest_match_multiple_warningsr\¶sN€äœ{Ð+€HÜ     ×    #Ñ    # H°NÔ    Cñ5܏ ‰ l¤MÔ2܏ ‰ Ð&¬ Ô4÷5÷5ñ5ús ¤5A"Á"A+có—|\}}tjtd¬«5tj|d¬«5t j d|«t j d|«ddd«ddd«y#1swYŒxYw#1swYyxYw)NzDid not see warning.*matchingr"rPzDo not match itrQrE)rÚtarget_categoryÚother_categorys   r Ú&test_right_category_wrong_match_raisesr`¾sw€Ø&=Ñ#€O^Ü    ‰”~Ð-LÔ    Mñ8Ü × 'Ñ '¨¸~Ô Nñ    8Ü M‰MÐ+¨_Ô =Ü M‰M˜,¨Ô 7÷    8÷8ð8÷    8ð    8ú÷8ð8ús"¡B¹-A7Á&BÁ7B    Á<BÂB Ú false_or_noneFcó—eZdZd„Zd„Zd„Zy)ÚTestFalseOrNoneExpectedWarningcóЗd}tjt|¬«5tj|«5t «ddd«ddd«y#1swYŒxYw#1swYyxYw)Nr!r")r&r'r(r)r*r)Úselfrar,s   r Útest_raise_on_warningz4TestFalseOrNoneExpectedWarning.test_raise_on_warningÈsW€Ø/ˆÜ ]‰]œ>°Ô 5ñ    Ü×+Ñ+¨MÓ:ñ Ü”÷ ÷    ð    ÷ ð ú÷    ð    ús!žA´ A¿AÁA    ÁAÁA%cóZ—tj|«5    ddd«y#1swYyxYwr)r)r*©reras  r Útest_no_raise_without_warningz<TestFalseOrNoneExpectedWarning.test_no_raise_without_warningÎs(€Ü × 'Ñ '¨ Ó 6ñ    Ø ÷    ÷    ñ    ús–!¡*cóp—tj|d¬«5t«ddd«y#1swYyxYw)NFr$)r)r*rrhs  r Ú'test_no_raise_with_false_raise_on_extrazFTestFalseOrNoneExpectedWarning.test_no_raise_with_false_raise_on_extraÒs,€Ü × 'Ñ '¨ ÈuÔ Uñ    Ü ŒC÷    ÷    ñ    ús˜ ,¬5N)rÚ
__module__Ú __qualname__rfrirkrr r rcrcÆs„òò ór rccóž—d}tjt|¬«5tjt
«5t ‚#1swYnxYw    ddd«n #1swYnxYwtjt|¬«5tjt
«5tjdt«t‚#1swYnxYw    ddd«n #1swYnxYwd}tjt|¬«5tjd«5tjdt«t‚#1swYnxYw    ddd«y#1swYyxYw)Nz3Did not see expected warning of class 'UserWarning'r"rzCaused unexpected warning) r&r'r(r)r*rTÚ
ValueErrorrrrÚ
IndexErrorÚ SystemErrorr+s r Útest_raises_during_exceptionrr×s€Ø
?€CÜ    ‰”~¨SÔ    1ñÜ × 'Ñ '¬ Ó 4ñ    ÜÐ ÷    ð    úð    ÷÷ñúô
‰”~¨SÔ    1ñÜ × 'Ñ '¬ Ó 4ñ    Ü M‰M˜/¬=Ô 9ÜÐ ÷    ð    úð    ÷÷ñúð
&€CÜ    ‰”~¨SÔ    1ñÜ × 'Ñ '¨Ó -ñ    Ü M‰M˜/¬=Ô 9ÜÐ ÷    ð    úð    ÷÷ñúsVžA¸?¿A    ÁAÁAÁ<C Â!B7Â7C    Â<C à CÃ6EÄ !D-Ä-D6    Ä2EÅE có¾—tjtd¬«5tjd«5td«‚#1swYnxYw    ddd«n #1swYnxYwtjt
d¬«5tjt d¬«5tjdt «t d«‚#1swYnxYw    ddd«y#1swYyxYw)NÚErrorr"r)    r&r'Ú SyntaxErrorr)r*rorrrrr r Útest_passes_during_exceptionrvés¶€Ü    ‰”{¨'Ô    2ñ'Ü × 'Ñ '¨Ó -ñ    'ܘgÓ&Ð &÷    'ð    'úð    '÷'÷'ñ'úô
‰”z¨Ô    1ñ&Ü × 'Ñ '¬ ¸_Ô Mñ    &Ü M‰M˜/¬=Ô 9ܘWÓ%Ð %÷    &ð    &úð    &÷&÷&ñ&ús8œA² >¾A    ÁAÁAÁ;CÂ&B=Â=C    ÃCÃC)$Ú__doc__rr&Ú pandas.errorsrrÚpandas._testingÚ_testingr)ÚfixturerrBrTrrYr rrÚmarkÚfilterwarningsr-Ú parametrizer6r<r@rCrHrLrNrVrZr\r`rcrrrvrr r ú<module>rs„ðñóã ÷õ
ð€‡àØØØØØØð ô
ñó
ðð€‡à    ˜Ð%Ø    mÐ$Ø    ˜Ð'Ø    Ð/Ð0Ø    ˜]Ð+Ø    Ð)Ð*Ø    Ð,Ð-Ø    Ð*Ð+ð     ñ    #ô ñó ðò(ð
‡×ÑÐ5Ó6ñ ó7ð ð‡×ÑØò óñ )ó!ð )ò
Bò Bò Bò>ò?òGò<ò.ò5ò8ð‡×ј¨5°$¨-Ó8÷ ð ó9ð ò ó$&r