a :êdg ã@s²dZddlZddlZddlZdd„ZGdd„dejƒZedkr®ejdd @Z e ej ƒd krpej d ej   ¡d n ej d d Wdƒn1s0Ye D]ZeejƒqždS)a² This module has a number of tests that raise different kinds of warnings. When the tests are run, the warnings are caught and their messages are printed to stdout. This module also accepts an arg that is then passed to unittest.main to affect the behavior of warnings. Test_TextTestRunner.test_warnings executes this script with different combinations of warnings args and -W flags and check that the output is correct. See #10535. éNcCst dt¡dS)NÚrw)ÚwarningsÚwarnÚRuntimeWarning©rrú8/usr/local/lib/python3.9/unittest/test/_test_warnings.pyÚwarnfunsrc@sDeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dS)Ú TestWarningscCs(| dd¡| dd¡| dd¡dS)Né)Z assertEquals©ÚselfrrrÚ test_asserts  zTestWarnings.test_assertcCs| d¡| d¡dS)NéT)Z failUnlessr rrrÚ test_fails zTestWarnings.test_failcCs| dd¡| dd¡dS)Nr éé)ZassertAlmostEqualZassertNotAlmostEqualr rrrÚtest_other_unittest s z TestWarnings.test_other_unittestcCs(t dt¡t dt¡t dt¡dS)NZdw)rrÚDeprecationWarningr rrrÚtest_deprecation%s  zTestWarnings.test_deprecationcCs(t dt¡t dt¡t dt¡dS)NÚiw)rrÚ ImportWarningr rrrÚ test_import*s  zTestWarnings.test_importcCs"t d¡t d¡t d¡dS)NZuw)rrr rrrÚ test_warning0s  zTestWarnings.test_warningcCstƒtƒtƒdS)N)rr rrrÚ test_function7szTestWarnings.test_functionN) Ú__name__Ú __module__Ú __qualname__r rrrrrrrrrrr sr Ú__main__T)ÚrecordrF)Úexitr)r)Ú__doc__ÚsysZunittestrrZTestCaser rÚcatch_warningsÚwsÚlenÚargvÚmainÚpopÚwÚprintÚmessagerrrrÚs +*